#4650 closed defect (fixed)
TestCapability OLCStringsAsUTF8 error in Shape driver
Reported by: | bishop | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.2 |
Component: | OGR_SF | Version: | |
Severity: | normal | Keywords: | OGRShapeLayer, OLCStringsAsUTF8, UTF8, |
Cc: |
Description
There is error in OGRShapeLayer::TestCapability - OLCStringsAsUTF8 returns true anyway if shape driver could not recode strings, e.g. if GDAL build without iconv.
The GDAL compiled without iconv supports recoding of strings to UTF8 from UTF-8, UTF-16, UCS-2, UCS-4, ASCII, ISO-8859-1. If shapefile have any other encodings (e.g. WIN1251) GDAL sets OLCStringsAsUTF8 as true, but cannot recode from WIN1251 to UTF8. Then GDAL assumes the encoding as ISO-8859-1 and processes wrong recode from ISO-8859-1 to UTF8.
I get such GDAL error message:
Shape: DBF Codepage = LDID/87 for D:\work\testgeodata\shp\adm_rai.shp Shape: Treating as encoding 'ISO-8859-1'.
Change History (4)
follow-up: 2 comment:1 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Component: | default → OGR_SF |
---|---|
Milestone: | → 1.9.2 |
Version: | svn-trunk |
r24553 /trunk/ (2 files in 2 dirs): Shape: make TestCapability(OLCStringsAsUTF8) more robust by actually trying to recode field names (and also since r24514, Windows builds of GDAL can support some recoding from/to CPxxx even without iconv)
r24554 /branches/1.9/gdal/ogr/ogrsf_frmts/shape/ogrshapelayer.cpp: Shape: make TestCapability(OLCStringsAsUTF8) more robust by actually trying to recode field names (#4650)
r24555 /trunk/gdal/ (5 files in 2 dirs): Additional fix for #4650
r24556 /branches/1.9/gdal/ (5 files in 2 dirs): Additional fix for #4650
The error was fixed in r24371