Opened 15 years ago
Closed 15 years ago
#1494 closed bug (worksforme)
for shapefiles: save/load of project has two problems with character encoding
Reported by: | smizuno | Owned by: | homann |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.0.3 |
Component: | Data Provider | Version: | Trunk |
Keywords: | Cc: | ||
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
For shapefiles (OGR), on project save and load, there are two problems:
- no encoding information is saved to the project file. Therefore, the shapefile may be opened with an incorrect encoding on loading a project.
I guessed (and found in the reading code) that a tag called <encoding> might be used, so I hand edited a project file to include this. Now the shapefile can be opened with the correct encoding.
- if a column name having i18n characters is used as the label field, that column does not appear as the label field on project load, even with the encoding info in the project file. Names without i18n characters do appear. I did find the column name in the project file, so it seems to be written out ok.
Further, saving and loading a style file does get the column name as the label.
I was using files with UTF-8 encoding, but I believe the problems will occur with other encodings.
Change History (4)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Component: | OGR Layer support → Data Provider |
---|
comment:3 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
Tested with r11403.
1) Encoding seems to be written to .qgs file now. Changing encoding with editor in the .qgs file (e.g. from utf.-8 to utf-16) does make the words unreadable.
2) Labels with i18n characters in field name does appear after re-loading project. I also re-loaded on win xp, and the i18n characters are as specified (utf-8).
Tested with a shapefile created from QGIS.
If you still think there's an error, please reopen.
Confirming. The same happens with 1.1 as well.