Bug 27283 - Some UMC tracebacks are wrong encoded in UTF8 (errors are ISO8859-1)
Some UMC tracebacks are wrong encoded in UTF8 (errors are ISO8859-1)
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.0
Other Linux
: P5 minor (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-24 15:59 CEST by Florian Best
Modified: 2017-04-28 09:07 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, Internationalization
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (1.52 KB, patch)
2015-05-20 14:22 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2012-05-24 15:59:59 CEST
Tracebacks enthalten oft � anstatt Umlauten/Sonderzeichen/UTF-8.

Es wäre schön, wenn das mal gefixt wird.
Comment 1 Alexander Kläser univentionstaff 2012-05-24 16:07:55 CEST
Ist das ggf. mit Bug 27256 behoben?
Comment 2 Florian Best univentionstaff 2012-05-25 14:48:34 CEST
(In reply to comment #1)
> Ist das ggf. mit Bug 27256 behoben?
Nein
Comment 3 Florian Best univentionstaff 2015-01-13 09:08:56 CET
Given in latin-1 are:
* Messages from PAM
* Messages from python-apt
* OSError exceptions (e.g. errno 12, cannot allocate memory)
Comment 4 Florian Best univentionstaff 2015-05-11 18:18:22 CEST
The UMC-Moduleprocess/Server only sets LC_MESSAGES but not LC_ALL:

>>> import os, locale
>>> locale.setlocale(locale.LC_MESSAGES, 'de_DE.UTF-8')
'de_DE.UTF-8'
>>> os.strerror(12)
'Nicht gen?gend Hauptspeicher verf?gbar'
>>> locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')
'de_DE.UTF-8'
>>> os.strerror(12)
'Nicht gen\xc3\xbcgend Hauptspeicher verf\xc3\xbcgbar'
Comment 5 Florian Best univentionstaff 2015-05-11 18:33:44 CEST
I think it is the best to set:
locale.setlocale(locale.LC_ALL, 'C.UTF-8')

so, LC_COLLATE is still the same. (Just if scripts called by UMC depend on this).
Comment 6 Florian Best univentionstaff 2015-05-20 14:22:45 CEST
Created attachment 6914 [details]
patch

small patch, only sets LC_CTYPE to minimize side effects.

"""
LC_CTYPE:
This category determines the interpretation of byte sequences as characters (e.g., single versus multibyte characters), character classifications (e.g., alphabetic or digit), and the behavior of character classes.
"""
Comment 7 Alexander Kläser univentionstaff 2015-06-02 10:24:27 CEST
Could a similar issue be related to Bug 38370?
Comment 8 Florian Best univentionstaff 2015-06-04 10:05:16 CEST
(In reply to Alexander Kläser from comment #7)
> Could a similar issue be related to Bug 38370?
I don't think so.
Comment 9 Florian Best univentionstaff 2017-04-28 09:07:33 CEST
Works since UCS 4.2.