ldminfod and broken UTF-8 sequences
Bug #1741616 reported by
Kim B. Heino
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LTSP5 |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Commit d3ab0dc8674e5 added decode() calls to "locale -a" parsing. decode() without any parameters equals to decode('utf-8', 'strict'), which will generate UnicodeDecodeError for non-UTF-8 input.
RHEL7's "locale -a" outputs such non-UTF-8 line:
fran<E7>ais
(That's "français" in ISO 8859-1 encoding)
Until RHEL7 gets fixed (might take years) this can be fixed in ldminfod by changing 'strict' to 'ignore'. Patch:
Changed in ltsp: | |
importance: | Undecided → Medium |
To post a comment you must log in.
On 2018-01-06, Kim B. Heino wrote:
> Commit d3ab0dc8674e5 added decode() calls to "locale -a" parsing.
> decode() without any parameters equals to decode('utf-8', 'strict'),
> which will generate UnicodeDecodeError for non-UTF-8 input.
>
> RHEL7's "locale -a" outputs such non-UTF-8 line:
>
> fran<E7>ais
Wow, Debian's "locale -a" only outputs the locale codes, e.g.:
$ locale -a
C
C.UTF-8
POSIX
en_US.utf8
So that's why I was unable to confirm the issue on Debian.
I suspect there are other cases where this type of fix is needed,
though.
> Until RHEL7 gets fixed (might take years) this can be fixed in ldminfod /git.launchpad. net/~bcgss/ ltsp/+git/ ldm- ?id=4750159ebfa acc8d530a9447f1 16f9f9b2832e47
> by changing 'strict' to 'ignore'. Patch:
>
> https:/
> rhel7/commit/
Thanks for the patch!
live well,
vagrant