Message179785
| Author |
Peter.Stahl |
| Recipients |
Peter.Stahl |
| Date |
2013年01月12日.11:26:53 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1357990016.64.0.159100060877.issue16944@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Yesterday, I opened a question on Stackoverflow that explains my problem in detail. Please read this page first:
http://stackoverflow.com/questions/14287051/german-number-separators-using-format-language-on-osx
A short summary: I'm on OSX 10.8.2. I wanted to format numbers according to the German numbering convention using Python's format language and the locale setting "de_DE". Actually, the following should work to achieve that:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'de_DE')
>>> '{0:n}'.format(1234.56)
The result of the last expressions should be 1.234,56. However, my result is 1234,56. More examples are on Stackoverflow.
According to what other SO members have found out, this is a problem with the locale settings of OSX because the grouping of numbers is not fully part of the locale "de_DE". On Windows, however, grouping works fine using the locale "deu_deu" which is not available on OSX.
Is this a bug? At least, it doesn't seem to be documented anywhere and is probably not the correct behavior even on OSX. Others have reported similar problems on OSX as well.
Do you have a quick solution for this issue? Thanks in advance. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年01月12日 11:26:56 | Peter.Stahl | set | recipients:
+ Peter.Stahl |
| 2013年01月12日 11:26:56 | Peter.Stahl | set | messageid: <1357990016.64.0.159100060877.issue16944@psf.upfronthosting.co.za> |
| 2013年01月12日 11:26:56 | Peter.Stahl | link | issue16944 messages |
| 2013年01月12日 11:26:53 | Peter.Stahl | create |
|