Feature request #6059

add the ability to select character code when creating a new shape file

Added by yoichi Kayama about 5 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Vectors
Pull Request or Patch supplied:No Resolution:fixed
Easy fix?:No

Description

When creating new shape file, we can't select character code set.
We must create all new files in the UTF-8 .
There is an inconvenience if we can not use column names only a short time when it UTF-8 Because of a limitation of the length of the column name in the Shapefile.
So I want to add the ability to select character code when creating a new shapefile.

newshape.png (26.1 KB) yoichi Kayama, 07/17/2012 01:24 PM

qgsencodingfiledialog.png (37.8 KB) Minoru Akagi, 08/06/2012 01:49 AM

fieldnameencoding.patch Magnifier (3.55 KB) Minoru Akagi, 10/10/2012 10:19 PM

fieldnameencoding_UTF8.patch Magnifier - patch file saved in UTF-8 (1.78 KB) Minoru Akagi, 10/10/2012 10:27 PM


Related issues

Related to QGIS Application - Bug report #4540: Garbled field names in newly created Shapefiles Closed 11/16/2011

History

#1 Updated by Minoru Akagi about 5 years ago

The encoding selectbox you wish is in the QgsEncodingFileDialog. It is displayed next to the "New Vector Layer" dialog.

As you know, the field name of DBF has some restrictions. As an example, it should be ASCII characters.

If you have to use multibyte or non-ASCII characters in the field names, you should use "Attribute aliases" ​​of QGIS. The aliases ​​are stored in both the QGIS Layer Style File(.qml) and the QGIS project file(.qgs). It works well.

#2 Updated by Paolo Cavallini about 5 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#3 Updated by Pirmin Kalberer almost 5 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#4 Updated by Minoru Akagi almost 5 years ago

Attached patch is useful for users who want to use non-ASCII characters in field names of attribute table. It modifies encoding conversion of field names in both creating new shapefile layer and adding column. It
  • Allows users to use non-ASCII characters in the field names even if selected encoding is not UTF-8.
  • Will increase the number of non-ASCII characters that users can use in the field name if users select the suitable encoding.
  • Requires that "Ignore shapefile encoding" option is checked.

#5 Updated by Minoru Akagi almost 5 years ago

I re-attach a patch file saved in UTF-8.

#6 Updated by Minoru Akagi over 4 years ago

I think no user selects ASCII-incompatible character encoding such as UTF-16 and UTF-32, to create shapefiles, because all encodings in this page are ASCII-compatible encodings.

Don't devs think it might be a good idea to implement the above and leave the decision whether to use non-ASCII characters to users?

#7 Updated by Borys Jurgiel over 4 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Also available in: Atom PDF