how to use Cyrillic in an attribute table in ArcMap 10.3.1

5231
4
Jump to solution
02-08-2016 02:04 PM
MK5
by
Deactivated User

I am creating a new attribute for an existing shapefile in ArcMap 10.3.1, which will contain a Russian place name (in Cyrillic alphabet).

While editing, I can enter information in Cyrillic, but as soon as I save the edits, the text both in the Attribute Table and Map converts to "??????????"

None of the fixes I have found online have worked. These have included:

- Checking that I have Cyrillic fonts enabled on my computer (Windows 7). I regularly type and read in Cyrillic in multiple applications. In ArcMap, Cyrillic is not recognized whether I copy and paste Cyrillic text, or enter it using a Cyrillic keyboard.

- I have tried changing the font used in tables in ArcMap (per this old discussion - Cyrillic Language Problem ). This did not help

- I tried using markup in the Attribute table, per this discussion - http://desktop.arcgis.com/en/arcmap/latest/map/publish-map-services/drawing-behaviors-of-the-map-ser...

I appreciate any tips you can give me.

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

for shapefiles, you need to have a codepage file (*.cpg) Shapefile file extensions—Help | ArcGIS for Desktop

which specifies which the codepage to use

I don't know if these apply to 10.3.1, but I will throw them out anyway

21106 - Read and write shapefile and dBASE files encoded in various code pages

Setting codepages in shapefiles to display in ArcMap 10 – A saga | Mapoholic

and this link... which you may be able to digest more than I do

Esri Support - Search Results

View solution in original post

4 Replies
DanPatterson_Retired
MVP Emeritus

for shapefiles, you need to have a codepage file (*.cpg) Shapefile file extensions—Help | ArcGIS for Desktop

which specifies which the codepage to use

I don't know if these apply to 10.3.1, but I will throw them out anyway

21106 - Read and write shapefile and dBASE files encoded in various code pages

Setting codepages in shapefiles to display in ArcMap 10 – A saga | Mapoholic

and this link... which you may be able to digest more than I do

Esri Support - Search Results

MK5
by
Deactivated User

Thanks for pointing me towards the .cpg file. I found an already-existing cpg file, opened it in a text editor, and manually edited the contents. I tried a couple of the charsets listed on this page: Character Sets

It looks like UNICODE or UTF-8 is working for my purposes.

Then saved the cpg file with my shapefile's name. It looks like it's working now.

If there's a more automated way to make this change, I'd be interested to hear it.

DanPatterson_Retired
MVP Emeritus

Distractions distractions.

A demo... using a sample *.cpg file.  only if you have a bunch of shapefiles in the same folder.

Test, and change.  Written verbosely so you get the drive

>>> import arcpy
>>> folder = r"F:\A2_in_progress\NearDemo\Shape_test"
>>> arcpy.env.workspace = folder
>>> FCs = arcpy.ListFeatureClasses() #see the help for more options
>>> for fc in FCs:
...  print("Shapefile : {}".format(fc))
...
Shapefile : Polyline.shp
Shapefile : RandomPnts.shp
>>> cpg = folder + "\\demo.cpg"
>>> for fc in FCs:
...  out_name = fc[:-4] + ".cpg"
...  arcpy.Copy_management(cpg, folder + "\\" + out_name)
... 
<Result 'F:\\A2_in_progress\\NearDemo\\Shape_test\\Polyline.cpg'>
<Result 'F:\\A2_in_progress\\NearDemo\\Shape_test\\RandomPnts.cpg'>
>>>
MK5
by
Deactivated User

Thanks, Dan!

0 Kudos