I want to convert my shapefile encoding source to ASCII but unfortunately, it is not given in the encoding source type. Maybe it is given with a different name or it is not supported in QGIS?
Unfortunately there is no guide available.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI want to convert my shapefile encoding source to ASCII but unfortunately, it is not given in the encoding source type. Maybe it is given with a different name or it is not supported in QGIS?
Unfortunately there is no guide available.
Many of the existing encodings are ASCII compatible, so there is no need for a dedicated ASCII encoding. E.g. latin-1 (ISO 8859-1) is one of these. And it's also the one which shapefiles should be encoded in according to the original standard (actually according to the dbf specification). Unfortunately it can only represent western european special characters.
ASCII itself only defines the first seven bits, only 128 of the 256 characters which can be represented with a single byte. The other half is defined in different encodings in the second half of the available characters. That's where latin-1/ISO8859-1 chose western european special characters.
What that means is, that giving someone a file using extended ASCII characters but not specifying the encoding is like giving someone a set of coordinates and not specifying the coordinate reference system. In explicit: it's just a bunch of bytes/numbers.
Normally file formats take this fact into account by specifying the encoding in a header whereas shapefile failes big time with respect to this but often a .cpg file is used to work around this deficiency.
Got a .cpg file? Good for you, applications will load the correct encoding automatically when opening the file.
Got none but still get strange characters? Good luck trying to figure out which to choose with trial and error. Best try through UTF-8 and the ISO8859-xx encodings.
To avoid such a situation for the consumer of your own files in the future you can do a couple of things
Interested in how ASCII and Unicode work? Have a look at this awesome explanation on Youtube