mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Merge pull request #8289 from borysiasty/csv_string_quoting
[needs-docs] Save layer as CSV: add STRING_QUOTING option to the predefined drop-down widgets
This commit is contained in:
commit
302529a10c
@ -843,6 +843,17 @@ class QgsVectorFileWriterMetadataContainer
|
|||||||
QStringLiteral( "COMMA" ) // Default value
|
QStringLiteral( "COMMA" ) // Default value
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
#if defined(GDAL_COMPUTE_VERSION) && GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(2,3,0)
|
||||||
|
layerOptions.insert( QStringLiteral( "STRING_QUOTING" ), new QgsVectorFileWriter::SetOption(
|
||||||
|
QObject::tr( "Double-quote strings. IF_AMBIGUOUS means that string values that look like numbers will be quoted." ),
|
||||||
|
QStringList()
|
||||||
|
<< QStringLiteral( "IF_NEEDED" )
|
||||||
|
<< QStringLiteral( "IF_AMBIGUOUS" )
|
||||||
|
<< QStringLiteral( "ALWAYS" ),
|
||||||
|
QStringLiteral( "IF_AMBIGUOUS" ) // Default value
|
||||||
|
) );
|
||||||
|
#endif
|
||||||
|
|
||||||
layerOptions.insert( QStringLiteral( "WRITE_BOM" ), new QgsVectorFileWriter::BoolOption(
|
layerOptions.insert( QStringLiteral( "WRITE_BOM" ), new QgsVectorFileWriter::BoolOption(
|
||||||
QObject::tr( "Write a UTF-8 Byte Order Mark (BOM) at the start of the file." ),
|
QObject::tr( "Write a UTF-8 Byte Order Mark (BOM) at the start of the file." ),
|
||||||
false // Default value
|
false // Default value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user