Parameter is unsupported by the current encoding
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
In trying to fix bug #56680 for the diffstat plugin, I need to bzr add the file attaches which contains unicode characters in the filename.
Unfortunately, I'm stumbling with bzr add crashing out with the following backtrace:
Traceback (most recent call last):
File "/usr/bin/bzr", line 102, in <module>
exit_val = bzrlib.
File "/usr/lib/
"encoding." % a))
bzrlib.
It's entirely possible that I just need to tweak something in my setup in order to get this to work, or it might be a bug. Either way, I'll appreciate some help on it. :)
I'm running bash on Ubuntu Hardy. A couple more snippets of information that I was asked to produce in IRC by Verterok:
rbrown@dorian t $ python -c "import sys; print sys.getdefaulte
ascii
rbrown@dorian t $ python -c "import sys; print sys.getfilesyst
UTF-8
tags: | added: encoding |
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in bzr: | |
status: | Triaged → Confirmed |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
When your encoding is ASCII you can't pass in a non-ascii character, because we have no way of understanding how to interpret the character.
Generally you can just do:
LANG="en_US.UTF-8"
export LANG
And that will set "sys.getdefault encoding( )" to UTF-8. (Note use can use your preferred language instead of en_US, the important thing is .UTF-8).
Note, that we don't use sys.getdefaulte ncoding( ) for command line arguments. We use:
import locale getpreferredenc oding()
print locale.
The function is "bzrlib. osutils. get_user_ encoding( )".