RE: Special Encoding

"Sinha, Vineesh" <[email protected]>
Newsgroups gmane.comp.lib.icu.general
Message-ID <[email protected]>
Thanks a lot for the prompt response.

Let me put my question more clearly. In this particular application, xml needs to 
be generated for all user actions. For instance, if the user creates a table of data,
that table needs to go into the XML. For all user activity, I'm building a DOM tree
using Xerces, and when the appropriate request comes, I serialize this DOM tree to 
a file. 

This application is localized by having key-value pair kind of set up. The code has keys
in it, and depending upon the output language setting for the application, the corresponding 
value is picked from the appropriate language file. To cut the technical jargons, it can 
be assumed that if the application output language is English, en/MyFile.txt is used to get 
the value for key, and if German is the preference, de/MyFile.txt is read. The key-value
file, MyFile.txt, exists for each supported language, and has language specific localized 
text for the values of the key.

I tried getting the output as preformatted texts in html file as well, but the texts are
not displayed appropriately in the browser. I'm working on a system with Microsoft 
Windows XP Prefessional Version 2002 (Service Pack 1). The browser is Microsoft Internet 
Explorer Version 6.0.2800. All I'm seeing in my editor (and browser) is garbage. I have 
the required fonts, and I can see the desired texts when typing directly from keyboard.
The text written programmatically is not what I expected.




-----Original Message-----
From: Steven R. Loomis [mailto:[email protected]] 
Sent: Friday, September 05, 2003 4:05 PM
To: Sinha, Vineesh
Cc: [email protected]
Subject: Re: Special Encoding


I don't quite understand what's going on here, but let me see if I can 
ask some things...

What is GetLocalisedString(),  what is the encoding of the std::string 
it returns?

the ICU Locale::setDefault() does not affect non-ICU services.   Rather 
than changing the default locale,  I would recommend that you maintain 
a Locale parameter as a variable, and change/use that rather than 
changing the default.

Other than the use of uloc_setDefault() it seems like your questions 
have more to do with Xerces than ICU.

What do you mean by 'not good encoded chinese strings' at the end?

If all of the data is to be UTF-8, why is there a question with the 
encoding?

Regards,
  Steven

On Friday, September 5, 2003, at 01:41 PM, Sinha, Vineesh wrote:
> Hi,
>
> I'm struggling to get the right encoding for the localized text. ...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.