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 previous message
mirek is currently offline  mirek
Messages: 13976
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
 
Read Message
Read Message
Previous Topic: About DHCtrl and window handles...
Next Topic: Force blitz on a group of files
Goto Forum:
  


Current Time: Sat May 11 13:22:06 CEST 2024

Total time taken to generate the page: 0.02520 seconds