How to read japanese characters in DBF

2988
5
01-18-2011 07:49 PM
ErosSy
by
New Contributor
I am not sure if the Forum is correct but I am stuck with reading a dbf but the data are garbled.
I successfully created a shp,shx and dbf compatible with esri. Then now, I am creating a java application that reads the 3 files for further processing.

please guide me on how to read a dbf file correctly.

Thanks in advance.
0 Kudos
5 Replies
BruceHarold
Esri Regular Contributor
Hi

If your DBF file is part of a shapefile, then you will need a codepage file to correctly interpret any Unicode strings.  If your shapefile root name is "xyz" then create a text file xyz.cpg with the contents "UTF-8" (not quoted) and hopefully that will work for you.

Regards
0 Kudos
ErosSy
by
New Contributor
hi bruce_harold,

Thanks a lot. but I can't understand when the .cpg file reads.
The java app that I am working is an internal app that convert the shape(shp,shx,dbf) to gml3.2.1.
0 Kudos
BruceHarold
Esri Regular Contributor
Hi

Only ESRI applications or SDK's will understand the CPG file, you may have to handle the Unicode encoding yourself in another environment.

Regards
0 Kudos
ErosSy
by
New Contributor
Thanks a lot..
I just thinking that there is an available api from esri to read the dbf correctly.

With appreciation
0 Kudos
V_StuartFoote
MVP Frequent Contributor
In addition to Bruce's response, please see this similar thread regards your question.

http://forums.arcgis.com/threads/21617-Japanese-characters-in-attribut-table-not-showing-properly?p=...

Stuart
0 Kudos