Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Making support for code pages unlimited
Re: Making support for code pages unlimited [message #25182 is a reply to message #25089] |
Sat, 13 February 2010 13:58 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
Mindtraveller wrote on Tue, 09 February 2010 17:45 | Recently I had some time to analyze encodings. And I've met a number of issues to be discussed.
First, I discovered that CHARSET_**** tables are not in unicode, but in UTF-8. If it is so, I should rebuild proposed tables according to this.
|
What makes you think that? Those tables are just UTF-16 codes for characters 128-255.
Quote: |
Second issue is simple etude, which actually failed. Just look at this simple code:CONSOLE_APP_MAIN
{
Cout() << ToCharset(CHARSET_CP866, "Всем привет!", CHARSET_UTF8);
}
I executed this example as console app under Windows XP. My "native" console code page under XP is CP866. But on program run, instead of cyrillic letters, I've seen garbage symbols. My question: what is wrong in this example and why do you think it fails to convert symbols properly?
|
Well, it looks like things are more complicated. I believe our part is OK, but the console simply expcts the output to be in different charset. E.g.:
http://illegalargumentexception.blogspot.com/2009/04/i18n-un icode-at-windows-command-prompt.html
However, more thinking about it, I believe we should perhaps use Unicode variant of WriteFile and convert current app encoding (which is utf8 by default) to unicode.
In that case, however, you example would work without ToCharset...
Mirek
|
|
|
|
|
Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Sat, 12 September 2009 16:27
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Thu, 17 September 2009 17:21
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Thu, 17 September 2009 19:24
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Sun, 20 September 2009 09:20
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Sun, 20 September 2009 23:07
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Thu, 24 September 2009 10:35
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Thu, 24 September 2009 11:05
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Thu, 24 September 2009 11:49
|
|
|
Re: Making support for code pages unlimited
By: mirek on Thu, 24 September 2009 11:50
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Fri, 25 September 2009 10:28
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Sat, 03 October 2009 21:11
|
|
|
Re: Making support for code pages unlimited
|
|
|
Re: Making support for code pages unlimited
By: mirek on Sat, 13 February 2010 13:58
|
|
|
Re: Making support for code pages unlimited
|
Goto Forum:
Current Time: Tue May 21 15:23:42 CEST 2024
Total time taken to generate the page: 0.02761 seconds
|