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 » UTF8 chars problems from from Linux to Windows
UTF8 chars problems from from Linux to Windows [message #25766] Wed, 10 March 2010 22:25 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Could somebody please test how does this layout look, both on Linux and on windows ?

LAYOUT(DANFeLayout, 276, 104)
	ITEM(EditCoeffs, gammaM0, LeftPosZ(52, 56).TopPosZ(32, 19))
	ITEM(Label, dv___1, SetLabel(t_("ƔM0")).LeftPosZ(4, 40).TopPosZ(32, 16))
	ITEM(EditCoeffs, gammaM1, LeftPosZ(52, 56).TopPosZ(56, 19))
	ITEM(Label, dv___3, SetLabel(t_("ƔM1")).LeftPosZ(4, 40).TopPosZ(56, 16))
	ITEM(EditCoeffs, gammaM2, LeftPosZ(52, 56).TopPosZ(80, 19))
	ITEM(Label, dv___5, SetLabel(t_("ƔM2")).LeftPosZ(4, 40).TopPosZ(80, 16))
	ITEM(StaticText, dv___6, SetText(t_("Steel - partial coefficients Ɣm :")).SetFont(StdFontZ(14).Bold()).LeftPosZ(4, 268).TopPosZ(4, 19))
END_LAYOUT


On my linux box is all ok, on my Windows7 one all the letters 'Ɣ' (gamma) are replaced by weird spaces.... And MANY other chars gets scrambled. Encoding is UTF8 on both sides.

Ciao

Max
Re: UTF8 chars problems from from Linux to Windows [message #25819 is a reply to message #25766] Sat, 13 March 2010 22:53 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Well, I discovered that in no way this 'gamma' letter can be passed to windows... Maybe it doesn't exist on its charsets.
Replacing it with another 'simil-gamma' found on windows did the trick.

Btw, the other 'big' problem in my app was GetSystemLNG(), which returns not only the language but also the active charmap :

lang = GetSystemLNG();
String langStr = LNGAsText(lang);


lang is 18141492 and langStr is "IT-IT windows-1252" in my machine.
Not sure about but, doing

SetLanguage(lang);


seems to activate both italian language AND 1252 codepage, making all UTF8 chars in app to disappear and/or be scrambled.
The solution was :

lang = GetSystemLNG();
String langStr = LNGAsText(lang).Left(5);
lang = LNGFromText(langStr);
SetLanguage(lang);


stripping so the codepage from language string and reconverting to integer, which in my machine gives lang=315700 and langStr="IT-IT" and allows UTF8 chars to behave as usual.
Note that this problem arose just on windows; on Linux it was all ok.

Ciao

Max
Re: UTF8 chars problems from from Linux to Windows [message #25836 is a reply to message #25819] Sun, 14 March 2010 22:35 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 307
Registered: July 2009
Senior Member
mdelfede wrote on Sat, 13 March 2010 22:53


The solution was :

lang = GetSystemLNG();
String langStr = LNGAsText(lang).Left(5);
lang = LNGFromText(langStr);
SetLanguage(lang);




Hi,

I use something like this:

SetLanguage( SetLNGCharset( GetSystemLNG(), CHARSET_UTF8 ) );
Re: UTF8 chars problems from from Linux to Windows [message #25849 is a reply to message #25836] Mon, 15 March 2010 19:53 Go to previous message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Thank you Zbych, yours way seems better Smile

Ciao

Max
Previous Topic: Updated romanian translation
Next Topic: Updated spanish translation
Goto Forum:
  


Current Time: Mon Dec 16 01:28:58 CET 2019

Total time taken to generate the page: 0.01347 seconds