importing UTF-8 shapefiles into feature class (with attachment)

4003
7
03-18-2016 04:40 AM
JonathanMcCloskey1
New Contributor

Hi All,

Here is an example of the shapefile which doesn't display it characters, I believe it is UTF-8 encoding issues.  I have tried creating a .cpg file with UTF-8 but still doesn't work.  I can open the shapefile in QGIS and save as UTF-8 and then it works perfectly.

Any help greatly appreciate.

Many thanks (Dan)

Jon

Tags (1)
0 Kudos
7 Replies
DanPatterson_Retired
MVP Emeritus

What is the codepage supposed to be?  When I don't have a utf8 codepage produced it reads fine in mine and I get a mix of other characters plus western

the *.cpg file just contains one line

UTF-8

JonathanMcCloskey1
New Contributor

Hi Dan,

I have identified the problem, the data has been exported from OSM data into various shapefiles.  It seems that there is a special character which doesn't like Unicode UTF-8.  I am using OpenOffice Calc, to import the DBF as UTF-8 and saving as the DBF.  If I get the following error;

Error saving the document amenity_point:
Write Error.

Cell A42707 contains a string that is longer in the selected target character set "Unicode (UTF-8)" than the field width.

Once I have it saved then everthing works perfect.  I need to do some further analysis with QGIS and ESRI to see if QGIS simple just ignores or removes these error when I import and export from there.

Many thanks

Jon

0 Kudos
DanPatterson_Retired
MVP Emeritus

they could be the culprits... and also, if the field isn't wide enough to accommodate the content, it may... I say may ... just skip the encoding.  This happens in some programming environments whereby trying to enforce a higher level/content data type may not be permissible in some situations.

HernandezAstorga
New Contributor

Hi everyone!!

I have a little big problem , I have  a file "File CPG (.cpg)",I try to open this in my ARCGIS10 but not let me "Invalid raster dataset. Failed to create raster layer". Any suggestions for open this file? My email is fhas33@gmail.com

Thank you 

0 Kudos
HernandezAstorga
New Contributor

Hi everyone!!

I have a little big problem , I have  a file "File CPG (.cpg)",I try to open this in my ARCGIS10 but not let me "Invalid raster dataset. Failed to create raster layer". Any suggestions for open this file? My email is fhas33@gmail.com

Thank you 

0 Kudos
HernandezAstorga
New Contributor

Hi everyone!!

I have a little big problem , I have  a file "File CPG (.cpg)",I try to open this in my ARCGIS10 but not let me "Invalid raster dataset. Failed to create raster layer". Any suggestions for open this file? My email is fhas33@gmail.com

Thank you 

0 Kudos
akosklosz
New Contributor

Hi

Open and Edit the notepad.

0 Kudos