[Shapelib] Re: [Gdal-dev] Shapelib and UNICODE

David Garcia david at aimsun.com
Mon Nov 29 12:22:21 EST 2004


Frank and Daniel,

Problem solved using string conversion function from 8 bit JIS7 to 
UNICODE. I use the methods provided by the Qt library (by Trolltech) but 
Daniel suggestion is another possibility. I tried to discover the text 
codec automatically without success so at the end I'm asking the user 
the text code to be use.

I believe that is a good idea to move GDAL to UNICODE if possible, 
getting rid of char* and using unsigned short * or, even better, a C++ 
string class that supports UNICODE. But this will not be a easy task as 
I have discover when trying to add support in my application for UNICODE.

Thanks,

    David


Daniel Morissette wrote:

>> David Garcia wrote:
>>
>>> Frank,
>>>
>>> I will try to convert the strings to UNICODE using a (still looking 
>>> for it) conversion function from the Windows Run Time.
>>>
>>> In any case, do you have any clue on how to convert it to a UNICODE 
>>> string readable by Windows?
>>
>>
>
> You'd have to know the original encoding I think.
>
> Anyway, maybe libiconv (http://www.gnu.org/software/libiconv/) could 
> help? I don't know much about it, just that it allows you to convert 
> between character encodings and works on Windows as well as Unix/Linux.
>
> I've also done some work with Windows functions from mbctype.h but 
> that was several years ago and I don't remember how that worked at 
> all. You may find some interesting hints in avc_mbyte.c in the AVCE00 
> library at http://avce00.maptools.org/avce00/index.html
>
> Good Luck!
>
> Daniel



-- 
David Garcia
Technical Manager
TSS-Transport Simulation Systems
Email: david at aimsun.com
Web: http://www.aimsun.com
Tel: +34 93 317 16 93
Fax: +34 93 317 17 16



More information about the Shapelib mailing list