Tom Stockfisch wrote:
I recently produced an internal database-driven website on cygwin and
found impossible internationalization issues. My client is based in
Toronto so telling them that accents were just not possible I knew
wouldn't fly. My input starts from excel files exported in xml format.
I couldn't get XMLString::transcode() to work on anything non-ascii in
this environment.
Perhaps because the local code page under cygwin doesn't support those
characters.
Switching to wcstombs() was of no help. Everything
worked fine in mac os x environment, but cygwin wouldn't display any
non-ascii correctly. I finally switched to iconv, which was very
successful. I treat the C++ and C char's as UTF-8. To get the strings
returned from xerces I use a iconv_open( "UTF-16LE", "UTF-8" ). To send
strings from C++ back to xerces I use a
iconv_open("UTF-8", "UTF-16LE"). This works for both cygwin and mac os x.
If your data is encoded in UTF-8, you can always use the Xerces-C
transcoding service, and create a UTF-8 transcoder. This will work on
all of the supported platforms.
Since XMLString::transcode() isn't officially supported I'm not sure if
I should report a bug to Xerces.
I'm not sure what you mean by XMLString::transcode() not being
officially supported. It's certainly supported for what it's meant to
do, which is to transcode between UTF-16 and the platform's local code page.
If you search the archives of the list, you'll discover that
XMLString::transcode() is often mis-used, which is why you were having
problems.
Dave