localeconv()->decimal_point([0]

W

WineNCheese

Any idea why when I call this function, it always returns a period
(full stop) instead of a comma, even though my regional settings say
it should return a comma? If not, is there another way to get this
information? This does not work on my PC.
 
S

Sven Gohlke

WineNCheese said:
Any idea why when I call this function, it always returns a period
(full stop) instead of a comma, even though my regional settings say
it should return a comma? If not, is there another way to get this
information? This does not work on my PC.

You may work on a system which don't support locales which are optional (the
function may return default values). Do it Yourself is the motto of choice.
 
B

Ben Pfaff

Any idea why when I call this function, it always returns a period
(full stop) instead of a comma, even though my regional settings say
it should return a comma? If not, is there another way to get this
information? This does not work on my PC.

Did you remember to call setlocale() first?
 
W

WineNCheese

I didn't know I needed to. All I need to do is get the decimal
character as defined by the current user's Regional Settings. If I
need to call setlocale() first, how do I get the parameters this
function needs for the current user's Regional settings?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top