Skip to content
Permalink
Browse files

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"
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Aug 21, 2018
1 parent ee4cba0 commit 379652d2022c5373d679d0d0edddfa53f27b9453
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/providers/delimitedtext/qgsdelimitedtextfile.cpp
@@ -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();

0 comments on commit 379652d

Please sign in to comment.
You can’t perform that action at this time.