Opened 17 years ago

Closed 6 years ago

Last modified 6 years ago

#66 closed defect (fixed)

label encoding problem whit UTF-8 (source from PostGIS-PostgreSQL)

Reported by: anonymous Owned by: traianstanev
Priority: major Milestone: 3.4.0
Component: OGR Provider Version: 3.2.0
Severity: 3 Keywords:
Cc: External ID:

Description

My data are stored in PostGIS database(PostgreSQL). Database is encoding in UTF-8.

After create map in label name i get bad polish letter.In PostgreSQL i see good signs...mapguide (AjaxViewer) generate bad encoding.

see on this print screen. http://img101.imageshack.us/img101/5127/znakijg6.jpg

what can i do whit this? UTF-8 is optimal encoding to me

ps. i convert my shp files whit PostGIS (command shp2pgsql)

Change History (3)

comment:1 by gregboone, 16 years ago

Milestone: 3.3.03.3.1

comment:2 by jng, 6 years ago

Resolution: fixed
Status: newclosed

In 7670:

Replace wchar_t <-> char conversion routines in the OGR provider with calls to GDAL's CPLRecodeXXX family of string conversion functions instead. In addition, add support for a new optional "DataSourceEncoding" connection parameter that allows a user to declare the encoding for a data source where such encoding cannot be inferred by the underlying OGR driver. When set, this declares the encoding of the [char] side of any wchar_t <-> char conversion. If not set, the [char] encoding defaults to UTF-8.

New unit tests have been added (with a test MapInfo tab file graciously provided by Geograf A/S) to verify that TAB files with unicode characters in property names and property values are not scrambled when connecting with the encoding (ISO-8859-1 for this tab file) specified up front. All other existing tests still pass with this change.

Special thanks to Hans Milling of Geograf A/S for testing, review of these changes and providing the test data to add to the ever growing test suite for the OGR provider.

Fixes #455
Fixes #66

comment:3 by jng, 6 years ago

In 7671:

Merged revision(s) 7670 from trunk:
Replace wchar_t <-> char conversion routines in the OGR provider with calls to GDAL's CPLRecodeXXX family of string conversion functions instead. In addition, add support for a new optional "DataSourceEncoding" connection parameter that allows a user to declare the encoding for a data source where such encoding cannot be inferred by the underlying OGR driver. When set, this declares the encoding of the [char] side of any wchar_t <-> char conversion. If not set, the [char] encoding defaults to UTF-8.

New unit tests have been added (with a test MapInfo tab file graciously provided by Geograf A/S) to verify that TAB files with unicode characters in property names and property values are not scrambled when connecting with the encoding (ISO-8859-1 for this tab file) specified up front. All other existing tests still pass with this change.

Special thanks to Hans Milling of Geograf A/S for testing, review of these changes and providing the test data to add to the ever growing test suite for the OGR provider.

Fixes #455
Fixes #66
........

Note: See TracTickets for help on using tickets.