fieldnameencoding_UTF8.patch
src/providers/ogr/qgsogrprovider.cpp | ||
---|---|---|
1127 | 1127 |
continue; |
1128 | 1128 |
} |
1129 | 1129 |
|
1130 |
OGRFieldDefnH fielddefn = OGR_Fld_Create( TO8( iter->name() ), type );
|
|
1130 |
OGRFieldDefnH fielddefn = OGR_Fld_Create( mEncoding->fromUnicode( iter->name() ).constData(), type );
|
|
1131 | 1131 |
OGR_Fld_SetWidth( fielddefn, iter->length() ); |
1132 | 1132 |
OGR_Fld_SetPrecision( fielddefn, iter->precision() ); |
1133 | 1133 |
|
... | ... | |
2070 | 2070 |
if ( precision < 0 ) |
2071 | 2071 |
precision = 3; |
2072 | 2072 |
|
2073 |
field = OGR_Fld_Create( TO8( it->first ), OFTReal );
|
|
2073 |
field = OGR_Fld_Create( codec->fromUnicode(it->first).constData(), OFTReal );
|
|
2074 | 2074 |
OGR_Fld_SetWidth( field, width ); |
2075 | 2075 |
OGR_Fld_SetPrecision( field, precision ); |
2076 | 2076 |
} |
... | ... | |
2079 | 2079 |
if ( width < 0 || width > 10 ) |
2080 | 2080 |
width = 10; |
2081 | 2081 |
|
2082 |
field = OGR_Fld_Create( TO8( it->first ), OFTInteger );
|
|
2082 |
field = OGR_Fld_Create( codec->fromUnicode(it->first).constData(), OFTInteger );
|
|
2083 | 2083 |
// limit to 10. otherwise OGR sets it to 11 and recognizes as OFTDouble later |
2084 | 2084 |
OGR_Fld_SetWidth( field, width ); |
2085 | 2085 |
} |
... | ... | |
2088 | 2088 |
if ( width < 0 || width > 255 ) |
2089 | 2089 |
width = 255; |
2090 | 2090 |
|
2091 |
field = OGR_Fld_Create( TO8( it->first ), OFTString );
|
|
2091 |
field = OGR_Fld_Create( codec->fromUnicode(it->first).constData(), OFTString );
|
|
2092 | 2092 |
OGR_Fld_SetWidth( field, width ); |
2093 | 2093 |
} |
2094 | 2094 |
else |