Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » How to display several languages without translation files?
Re: How to display several languages without translation files? [message #4441 is a reply to message #4422] |
Tue, 08 August 2006 19:24 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
luzr wrote on Sun, 06 August 2006 07:26 |
Oooops. Looks like my explanation about "default-default" charset was wrong.... Perhaps because of backward compatibility, default-default is WIN1252 (which AFAIK is equal to ISO-8859-1) - code-pages used in US.
So what you need to do is SetDefaultCharset(CHARSET_UTF8); at the start of your code.
(Should I change this?)
There is no need to play with ToUnicode then, just use the UTF-8:
chrset::chrset()
{
CtrlLayout(*this, "Window title");
lbl1 = "řeřicha česky";
lbl2 = "Революция";
lbl3 = "∑¤∂¼½đ";
}
GUI_APP_MAIN
{
SetDefaultCharset(CHARSET_UTF8);
chrset().Run();
}
Mirek
|
Thanks! At last (I think...) I understand
===
U++, when compiling, doesn't use the same "brain part" which U++ editor uses... and doesn't know which encoding comes to its "mouth".
When compiling, you have to tell U++ "brain" which "mouth" to open by telling explicitly SetDefaultCharset(...).
Then you can manipulate the "digesting process" (and different "output products") with ToCharset, ToUnicode, ToUtf... etc.
===
Conclusive tip: To have WYSIWYG (what you see is what you get) you have to have the same encoding (eg. UTF8) for your file and SetDefaultCharset(...).
===
The scope of SetDefaultCharset(...) is your application (not package).
===
Is everything correct?
[P.S.Edited according to below... ]
[Updated on: Wed, 09 August 2006 17:13] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 11 07:20:28 CEST 2024
Total time taken to generate the page: 0.02577 seconds
|