[gdal-dev] Re: Writing non-ASCII characters to shapefile

Francis Markham fmarkham at gmail.com
Mon Jul 5 05:18:52 EDT 2010


At the bottom of this page, for one:
http://resources.arcgis.com/content/kbase?fa=articleShow&d=21106

But honestly I've found hard to find  information about this.  I'd be
very happy to be corrected if this is not the case!

Cheers,

Francis

On 5 July 2010 19:09, Hermann Peifer <peifer at gmx.eu> wrote:
> Francis, you wrote:
>
>> > I have heard that the use of UTF-8 in shapefiles is not portable.
>
> Where did you hear this?
>
> Regards, Hermann
>
>
> On 03/07/2010 04:40, Francis Markham wrote:
>>
>> Hi there,
>>
>> I'm trying to write data from a Microsoft Excel .xls file into a
>> shapefile, using OGR's Python bindings in Python 2.6.  This is going
>> well, but I am having some problems when I try to write values that
>> contain so-called "smart quotes".  Smart quotes are special
>> characters, defined as characters 0x91 through 0x94 in Windows-1252 (
>> see http://msdn.microsoft.com/en-au/goglobal/cc305145.aspx ).
>>
>> What is the best way to save this data to a shapefile using OGR?  I
>> need the shapefile to be interoperable with other programs, including
>> but not limited to ESRI products. While I assume I could simply
>> translate these characters to standard ASCII, I would prefer not to if
>> possible.  I also haven't tested the shapefiles with data from other
>> character encodings.
>>
>> I have heard that the use of UTF-8 in shapefiles is not portable.  I
>> am also aware that shapefile.cpg can store a shapefile's codepage.  I
>> don't know how to put these pieces together to create a portable
>> solution, however.
>>
>> Apologies if this is a newbie question, but I can't find answers on the
>> web.
>>
>> Thanks,
>>
>> Francis Markham
>
>


More information about the gdal-dev mailing list