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 » Developing U++ » U++ Developers corner » Interesting problem with setlocale
Interesting problem with setlocale [message #13051] Fri, 07 December 2007 10:11 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Looks like using "setlocale" should be avoided in U++ apps.

Consider this:

setlocale (LC_ALL, "deDE")

....
SQL * Insert(FOO)(COLUMN, 1.1);


The trouble is that this locale will change sprintf (used on low-level to format double) behaviour to print the number using ",", so the result:

insert into FOO(COLUMN) values(1,1)


is wrong....

Now I am not quite sure if this should be fixed... (I can create different double formatting function that will guarantee '.' and use it where it matters).

Mirek
Re: Interesting problem with setlocale [message #13056 is a reply to message #13051] Fri, 07 December 2007 11:24 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, fixed....
Previous Topic: About DHCtrl and window handles...
Next Topic: Force blitz on a group of files
Goto Forum:
  


Current Time: Sun Apr 28 00:21:57 CEST 2024

Total time taken to generate the page: 0.05545 seconds