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 » Extra libraries, Code snippets, applications etc. » OS Problems etc., Win32, POSIX, MacOS, FreeBSD, X11 etc » localized formating of double on linux
localized formating of double on linux [message #19657] Tue, 30 December 2008 11:33 Go to previous message
lokki is currently offline  lokki
Messages: 20
Registered: November 2005
Promising Member
Hello,

I'm porting application developed in UPP on Windows to Linux (using Gentoo 2008.1).

When formating double values (displayed in GridCtrl, in EditDouble), strage output appears. Following converter worked on windows but gives strange results on linux
class ConvertMoney : public ConvertDouble
{
public: ConvertMoney() : ConvertDouble() {Pattern("%2!nl");}
};

e.g. whe we have in database value 1.234, on windows is displayed string "1,23", on linux "1,00". It always changes last two charactes with zeros. Experimenting with converter's pattern gives no acceptable results.

My linux locale is:
LANG=sk_SK.utf8
LC_CTYPE=sk_SK.utf8
LC_NUMERIC="sk_SK.utf8"
LC_TIME="sk_SK.utf8"
LC_COLLATE=C
LC_MONETARY="sk_SK.utf8"
LC_MESSAGES="sk_SK.utf8"
LC_PAPER="sk_SK.utf8"
LC_NAME="sk_SK.utf8"
LC_ADDRESS="sk_SK.utf8"
LC_TELEPHONE="sk_SK.utf8"
LC_MEASUREMENT="sk_SK.utf8"
LC_IDENTIFICATION="sk_SK.utf8"
LC_ALL=

At the begining of code, the laguage is set:
int language = LNGC_('S','K','S','K', CHARSET_UTF8);
SetLanguage(language);

Database is Postgresql 8.3,

Thanks in advance for any clue.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Huge amount of linking errors [FreeBSD 7.1, GCC 4.3]
Next Topic: MSVC++ Runtime error
Goto Forum:
  


Current Time: Thu Apr 25 19:44:41 CEST 2024

Total time taken to generate the page: 0.03648 seconds