Questions tagged [localeconv]

3 questions
9
votes
2 answers

Get date format in Python in Windows

In a sample code given to me for my homework, this line appears: date_format = locale.nl_langinfo(locale.D_FMT) But in Windows that line returns the following error: File "C:\Users\Shadark\Dropbox\IHM\P3\p3_files\www\cgi-bin\todolist.py", line 11,…
Shadark
  • 499
  • 1
  • 7
  • 18
3
votes
4 answers

_configthreadlocale and localeconv

As we all know, global data, like the locale settings affecting the numeric decimal point printf() and strtod() are using, is evil. Fortunately, MSVC++ 9 allows to use per-thread locales by a _configthreadlocale(_ENABLE_PER_THREAD_LOCALE) call.…
paavo256
  • 181
  • 3
1
vote
1 answer

PHP setlocale: configs lost after a DB connections during process

I use multiple servers to get data, but when i connect to a specific one, PHP lost the locale configuration. So i pull data and format money numbers, but on the way of the process, if it connect to that server, then the rest of the process does not…