encoding
William Dode
wilk-ml at flibuste.net
Mon Apr 4 13:25:58 BST 2005
Szekeres István <szekeres at iii.hu> writes:
>> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 10: ordinal not in range(128)
>>
>> Are your locale variables (at least LC_CTYPE) set correctly?
>
> Sorry, I was too fast. On my system it also fails with the same problem with
> correct locale variables.
>
Yes, in site.py there are theses lines by default to ignore default
locale :
# Set the string encoding used by the Unicode implementation. The
# default is 'ascii', but if you're willing to experiment, you can
# change this.
encoding = "ascii" # Default value set by _PyUnicode_Init()
if 0:
# Enable to support locale aware default string encodings.
import locale
loc = locale.getdefaultlocale()
if loc[1]:
encoding = loc[1]
If we change ``if 0:`` by ``if 1:`` it will works.
--
William - http://flibuste.net
More information about the bazaar
mailing list