UnicodeDecodeError exception in bzr whoami

Bug #193089 reported by DanielBachran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Unassigned

Bug Description

Hello everybody, I have a UnicodeDecodeError exception with a twist here. I didn't find a real similar bug already, so I'm submitting this as new bug.

"bzr whoami" crashes upon first call of newly installed bzr on a fresh Ubuntu machine (but I guess this will happen w/ every linux box out there). The funny thing is that my machines' host name is "bartimäus". Yes, with an a umlaut, you've seen that right.

How to reproduce:
- Have a machine w/ "funny" hostname
- Install bzr for the first time on this machine
- Run "bzr whoami"

Expected results:
- bzr should print something like "user@hostname"

Actual results:
- bzr crashes, printing out the UnicodeDecodeError exception (traceback attached)

A regular user may be lost here. Although, a regular user most likely won't install bzr. So please forget this comment.

My locale output:
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$

ciao, daniel :-)

Tags: easy
Revision history for this message
DanielBachran (dbachran) wrote :
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

We should probably be decoding the socket.gethostname() based on something (rather than assuming it is pure ascii).

However, what encoding is the hostname in?

Revision history for this message
Martin Pool (mbp) wrote :

Patch posted to list by Andy Kilner.

Changed in bzr:
status: Confirmed → In Progress
Revision history for this message
Parth Malwankar (parthm) wrote :

Link to the thread mentioned by Martin Pool in comment #3.
http://thread.gmane.org/gmane.comp.version-control.bazaar-ng.general/59751

Revision history for this message
Martin Packman (gz) wrote :

This bug is no longer present since the whoami guessing code has been removed.

Changed in bzr:
milestone: none → 2.2.0
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.