Skip to content

Commit 379652d

Browse files
agiudiceandreanyalldawson
authored andcommittedAug 27, 2018
delimited text: let field names be numerical value
fixes #19638 "CSV: numeric header gets a trailing underscore + 1" fixes #13187 "Numeric FIELD names are lost on CSV import"
1 parent ee4cba0 commit 379652d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎src/providers/delimitedtext/qgsdelimitedtextfile.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ QgsDelimitedTextFile::QgsDelimitedTextFile( const QString &url )
3434
: mFileName( QString() )
3535
, mEncoding( QStringLiteral( "UTF-8" ) )
3636
, mDefaultFieldName( QStringLiteral( "field_%1" ) )
37-
// field_ is optional in following regexp to simplify QgsDelimitedTextFile::fieldNumber()
38-
, mDefaultFieldRegexp( "^(?:field_)?(\\d+)$", Qt::CaseInsensitive )
37+
, mDefaultFieldRegexp( "^(?:field_)(\\d+)$", Qt::CaseInsensitive )
3938
{
4039
// The default type is CSV
4140
setTypeCSV();

0 commit comments

Comments
 (0)
Please sign in to comment.