U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Tue May 19 16:04:44 GMT+2 2026

Total time taken to generate the page: 0.00390 seconds