UnicodeDecode error when running lsmod_info script with "C" locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
Medium
|
Daniel Manrique |
Bug Description
This was observed when running Checkbox as root, such that LANG and LANGUAGE are set to "C".
Steps to reproduce:
$ LANG=C LANGUAGE=C /usr/share/
Expected result:
- List of modules and versions
Actual result:
- When hitting "drm" module, which has a non-ASCII character (José), this trace appears:
dm_raid45: 3.2.0-30-generic
dm_region_hash: 3.2.0-30-generic
Traceback (most recent call last):
File "/usr/share/
sys.
File "/usr/share/
stream, err = process.
File "/usr/lib/
return self._communica
File "/usr/lib/
self.
File "/usr/lib/
return data.decode(
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 207: ordinal not in range(128)
If modinfo will always output utf-8, one thing to do would be forcing string handling to use utf-8 always, regardless of autodetected charset based on locale.
Related branches
- Daniel Manrique (community): Needs Resubmitting
- Zygmunt Krynicki (community): Approve
-
Diff: 58 lines (+13/-7)2 files modifieddebian/changelog (+2/-1)
scripts/lsmod_info (+11/-6)
Changed in checkbox: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in checkbox: | |
status: | Triaged → In Progress |
assignee: | nobody → Brendan Donegan (brendan-donegan) |
Changed in checkbox: | |
assignee: | Brendan Donegan (brendan-donegan) → nobody |
Changed in checkbox: | |
status: | In Progress → Confirmed |
Changed in checkbox: | |
assignee: | nobody → Daniel Manrique (roadmr) |
status: | Confirmed → In Progress |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |