Ticket #2529 (closed defect: fixed)
Make UTF-8 encoding work even without Iconv support
| Reported by: | dmorissette | Owned by: | dmorissette |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.2 release |
| Component: | MapServer C Library | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Posted by Ned Harding to mapserver-dev on 2008-02-26:
Hey All, Here is a tiny little patch I would propose. It makes UTF-8 (and only UTF-8) encoding work on windows without having iconv.h. Seems like it wouldn't have any side effects - it is certainly working for me...
Index: S:/3rdParty/GIS/MapServer/mapstring.c =================================================================== --- S:/3rdParty/GIS/MapServer/mapstring.c (revision 14821) +++ S:/3rdParty/GIS/MapServer/mapstring.c (working copy) @@ -1072,6 +1072,9 @@ return out; #else + if (*string == 0 || (encoding && strcasecmp(encoding, "UTF-8")==0)) + return strdup(string); /* Nothing to do: string already in UTF-8 */ + msSetError(MS_MISCERR, "Not implemeted since Iconv is not enabled.", "msGetEncodedString()"); return NULL; #endif
ned.
Change History
Note: See
TracTickets for help on using
tickets.
