Skip to content

Commit

Permalink
delimited text: let field names be numerical value
Browse files Browse the repository at this point in the history
fixes #19638 "CSV: numeric header gets a trailing underscore + 1"
fixes #13187 "Numeric FIELD names are lost on CSV import"
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Aug 27, 2018
1 parent ee4cba0 commit 379652d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/providers/delimitedtext/qgsdelimitedtextfile.cpp
Expand Up @@ -34,8 +34,7 @@ QgsDelimitedTextFile::QgsDelimitedTextFile( const QString &url )
: mFileName( QString() )
, mEncoding( QStringLiteral( "UTF-8" ) )
, mDefaultFieldName( QStringLiteral( "field_%1" ) )
// field_ is optional in following regexp to simplify QgsDelimitedTextFile::fieldNumber()
, mDefaultFieldRegexp( "^(?:field_)?(\\d+)$", Qt::CaseInsensitive )
, mDefaultFieldRegexp( "^(?:field_)(\\d+)$", Qt::CaseInsensitive )
{
// The default type is CSV
setTypeCSV();
Expand Down

0 comments on commit 379652d

Please sign in to comment.