self-hosting repo available
Erik Bågfors
zindar at gmail.com
Mon Apr 11 10:21:22 BST 2005
On 11 Apr 2005 11:18:12 +0200, Lele Gaifax <lele at nautilus.homeip.net> wrote:
> >>>>> "Erik" == Erik Bågfors <zindar at gmail.com> writes:
>
> Erik> in create_tracefile t.write(' by %s on %s\n' %
> Erik> (bzrlib.osutils.username(), socket.getfqdn())) File
> Erik> "/usr/lib/python2.4/codecs.py", line 444, in write return
> Erik> self.writer.write(data) File "/usr/lib/python2.4/codecs.py",
> Erik> line 178, in write data, consumed = self.encode(object,
> Erik> self.errors) UnicodeDecodeError: 'ascii' codec can't decode
> Erik> byte 0xc3 in position 11: ordinal not in range(128) [Exit 1
> Erik> ]
>
> Erik> What can be the cause of this?
>
> By any chance it's related to an encoding mismatch between what
> osutils.username() collects and your environment, that appear to be
> 'ascii'.
>
> Maybe your system does not setup the Python environment appropriately:
> on my Debian machines I have to tweak /etc/python2.3/site.py to enable
> the default encoding machinery.
>
> What does the following
>
> $ python
>
> >>> import sys
> >>> print sys.getdefaultencoding()
> iso-8859-15
>
> produce for you?
>
Thanks lele. You are right. It gives me ascii. Should python take
this from locale? It's all UTF-8 there?
: [bagfors at zyrgelkwytng]$ ; locale
LANG=sv_SE.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_PAPER="sv_SE.UTF-8"
LC_NAME="sv_SE.UTF-8"
LC_ADDRESS="sv_SE.UTF-8"
LC_TELEPHONE="sv_SE.UTF-8"
LC_MEASUREMENT="sv_SE.UTF-8"
LC_IDENTIFICATION="sv_SE.UTF-8"
LC_ALL=
Regards,
Erik
More information about the bazaar
mailing list