The simple transcode APIs work between the XMLCh format and the local code
page. If you pass in data that is not in the local code page, then you
should pass it in in XMLCh format. Changing your locale is probably not the
right answer because it might freak out other code running in the same app,
and its definitely not a very portable thing to do. The right thing is to
get a transcoder for the encoding your info is in, and use that to transcode
it to XMLCh and pass that in to the parser.
One thing that DOM perhaps should do is to accept an encoding name for what
takes in (and spitsout ) char* data as, and not always work in the local
code page, though it would by default. Each DOM document would just allow
you to tell it what encoding you want to get non-XMLCh data into it and out
of it, and create a transcoder internally for this work. If you don't say,
then it will default to the local code page, which is convenient for many
casual apps using the DOM. An advantage to this (which setting the locale
won't do) is to allow you get data into/outof a DOM in multiple encodings in
the same app if that was ever needed (which it might in say an XML based
server.)
--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
[EMAIL PROTECTED]
http://www.charmedquark.com
"Why put off until tomorrow what you can
put off until the day after tomorrow?"
----- Original Message -----
From: "Debra Kelly" <[EMAIL PROTECTED]>
To: "'Juergen Hermann'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, May 22, 2001 9:55 AM
Subject: RE: DOMString and international characters
> Thanks J�rgen. I used setlocale(LC_CTYPE, "").
> It returns "en_US"
>
> It's simple, but can you explain why this works?
>
> deb
>
> -----Original Message-----
> From: Juergen Hermann [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 21, 2001 8:26 PM
> To: Debra Kelly; [EMAIL PROTECTED]
> Subject: Re: DOMString and international characters
>
>
> On Mon, 21 May 2001 17:02:32 -0400, Debra Kelly wrote:
>
> >Any help will be greatly appreciated.
>
> Simple: call setlocale() and set your LANG to de_DE. And have your input
> document have an encoding="iso-8859-1".
>
>
> Ciao, J�rgen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]