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++ Core » StrDbl and decimal separator
Re: StrDbl and decimal separator [message #8875 is a reply to message #8855] Wed, 04 April 2007 19:11 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1187
Registered: March 2006
Location: Italy
Senior Contributor
I've found this piece of code in the library:
LanguageInfoCS::LanguageInfoCS()
: LanguageInfo(LNG_CZECH)
{
	english_name = "Czech";
	native_name = ToUnicode("Česky", CHARSET_WIN1250); // __FILE__CHARSET__
//	charset = CHARSET_WIN1250;
//	thousand_separator = L" ";
//	decimal_point = L",";
}

maybe even in CZECH it is used the "," as decimal separator. Because I need to exchange the files produced by windows and linux, it is important to freeze one time for all the internal representation of the decimal_point. So I am ready to modify the library and override, within my app, what the user has choosen before.
So the question is: how to set definitively the "." as decimal point for all kind of language?

It seems I've to intercept the following instrctions:
decimal_point = GetLocaleInfoA(lcid, LOCALE_SDECIMAL); //windows
decimal_point = lc->decimal_point; // linux

and set for both

decimal_point = ".";

is it enough or I am going to do weird things?
Thank you,
Luigi
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Unsafe Deep Copy
Next Topic: Value and Serialize
Goto Forum:
  


Current Time: Tue May 28 22:35:39 CEST 2024

Total time taken to generate the page: 0.01977 seconds