Unicode characters in SSID
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wicd |
Confirmed
|
Undecided
|
Unassigned | ||
wicd (Debian) |
New
|
Unknown
|
Bug Description
My SSID contains highly unusual unicode characters, and it make wicd-curses to crash with:
File "/usr/share/
('$A', network).replace
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)
The problem is with :
set_
('$A', network).replace
Here you're mixing `unicode` and `str` objects, (output of `_` is an unicode string). What's bugging my mind is that `network` come from a "misc.to_unicode" function that actually returns a `str` object and not a `unicode` one as advertised, which is not nice.
If we stop mixing `uncicode` and `str` here and only use `unicode`, we're getting :
(u'$A', network.
it works for me.
'utf-8' is hardcoded here because it's hardcoded also in 'misc.to_unicode', so it may work, but I don't think it's the right way to handle strings in Python, as we're doing (decode(
But I agree that working with unicode in Python 2 is a PITA, maybe 2016 is the time to upgrade to Python 3 ? I may help.
Changed in wicd: | |
status: | New → Confirmed |
Changed in wicd (Debian): | |
status: | Unknown → New |
I have the same error, definitely support python 3 is a good opportunity.