homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients eric.smith, mark.dickinson, skrah
Date 2009年12月18日.00:35:58
SpamBayes Score 5.0128174e-10
Marked as misclassified No
Message-id <1261096560.36.0.577282923004.issue7442@psf.upfronthosting.co.za>
In-reply-to
Content
I can reproduce it on a Fedora (fc6) Linux box. It's not a decimal
problem, but a plain locale problem:
>>> import locale
>>> locale.setlocale(locale.LC_NUMERIC, 'fi_FI')
'fi_FI'
>>> locale.localeconv()
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/root/python/py3k/Lib/locale.py", line 111, in localeconv
 d = _localeconv()
ValueError: Cannot convert byte to string
>>> 
Here's the contents of the struct lconv as returned by localeconv():
((gdb) p *l
1ドル = {decimal_point = 0xb7b54020 ",", thousands_sep = 0xb7b54022 " ",
grouping = 0xb7b54024 "003円003円", 
 int_curr_symbol = 0x998858 "", currency_symbol = 0x998858 "",
mon_decimal_point = 0x998858 "", mon_thousands_sep = 0x998858 "", 
 mon_grouping = 0x998858 "", positive_sign = 0x998858 "", negative_sign
= 0x998858 "", int_frac_digits = 127 '177円', 
 frac_digits = 127 '177円', p_cs_precedes = 127 '177円', p_sep_by_space =
127 '177円', n_cs_precedes = 127 '177円', 
 n_sep_by_space = 127 '177円', p_sign_posn = 127 '177円', n_sign_posn =
127 '177円', int_p_cs_precedes = 127 '177円', 
 int_p_sep_by_space = 127 '177円', int_n_cs_precedes = 127 '177円',
int_n_sep_by_space = 127 '177円', int_p_sign_posn = 127 '177円', 
 int_n_sign_posn = 127 '177円'}
The problem is thousands_sep:
(gdb) p l->thousands_sep
2ドル = 0xb7b54022 " "
(gdb) p (unsigned char)l->thousands_sep[0]
3ドル = 160 ' '
History
Date User Action Args
2009年12月18日 00:36:00eric.smithsetrecipients: + eric.smith, mark.dickinson, skrah
2009年12月18日 00:36:00eric.smithsetmessageid: <1261096560.36.0.577282923004.issue7442@psf.upfronthosting.co.za>
2009年12月18日 00:35:59eric.smithlinkissue7442 messages
2009年12月18日 00:35:58eric.smithcreate

AltStyle によって変換されたページ (->オリジナル) /