[gdal-dev] Shapefiles encoded in UTF-16 ?

Andreas Oxenstierna ao at t-kartor.se
Thu Feb 21 05:11:15 PST 2019


More relevant question should be if OGR support GeoPackage in UTF-16, as 
this is defined in the spec.
I hope the GIS community some day may forget the horrible DBF limitations...

>> I have never encountered a shapefile in UTF-16, but I am beginning to wonder
>> if we ought to support them.
> While nobody has ever seen one such file, that remains a rather theoretical
> exercice :-)
>
>> I guess they would be more space-efficient for
>> languages like Chinese and Japanese, where most characters need three UTF-8
>> bytes but only two UTF-16 bytes. This could be important since DBF reserves
>> only 10 bytes for field names.
>>
>> Some questions:
>>
>> Can the OGR Shape driver handle UTF-16?
> Probably not. I guess it would have issues with the NUL bytes found in
> characters of the ASCII subset of UTF-16. The shapelib DBF API assumes NUL
> terminated strings.
>
>> (I also wonder if shapefiles in UTF-16 is a good idea, or if the GIS
>> community just ought to forget about them, but I guess there is no definite
>> answer to that!)
> I'd say unless such beasts are widely found in the wild, let's not bother too
> much about that...
>
> Even
>

-- 
Hälsningar

Andreas Oxenstierna
T-Kartor Geospatial AB
Olof Mohlins väg 12 Kristianstad
mobile: +46 733 206831
mailto: ao at t-kartor.se
http://www.t-kartor.com



More information about the gdal-dev mailing list