Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #4443 is a reply to message #4441] Tue, 08 August 2006 20:29 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
Beware, scope of SetDefaultCharset is the whole application (I cannot imagine how to limit its scope to package only....)

I guess this needs more explainint.

DefaultCharset is single global variable. Value of this variable is used on a couple of absolutely critical places to convert char to wchar and back when no explicit charset (codepage) is specified, namely:

String <-> WString
host OS text (e.g. filesystem names)
text translations via t_ function (all translations are stored in UTF-8, t_ translates them to current default charset).

Maybe I forgot something, but these three points are mostly enough to have your app in any encoding you need.

Speaking about UTF-8, note that U++ UTF-8 has a little "improvement" - standard UTF-8 has problem as not every combination of bytes is valid UTF-8 text (means you can have "UTF-8 format errors").

This causes stupid problem for UTF-8 capable editors (e.g. the source editor in TheIDE) - if you have a file that contains multiple encodings (why not...), you cannot open it in the editor.

Therefore, U++ extends UTF-8 to cover these cases by encoding "errors" using "Unicode private area" - 0xee00 - 0xeeff. This way, you can load and save such files without problems. (Nice name for this format is therefore UTF-8EE - could mean "error extension" and is the same as hex address Wink

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: some non-english characters don't display
Next Topic: incorrect date format for hungarian language
Goto Forum:
  


Current Time: Sun May 12 06:42:46 CEST 2024

Total time taken to generate the page: 0.02694 seconds