On Freitag, 27. Oktober 2017 17:03:58 CEST Dominique Leuenberger / DimStar wrote:
On Fri, 2017-10-27 at 16:13 +0200, jan matejek wrote:
This could be changed in gtk-doc itself (although that is impractical), but perhaps a better way is to change the default locale for spec scriptlets. Right now the macros set it to C. We could switch that to "C.UTF-8", "en_US.UTF-8", or export a special RPM variable that could be overriden in your spec file. Still, the default should be something with UTF-8 in it.
I support this overall approach of getting it fixed 'high up'.
One thing that strikes generally as 'odd' (looking at gtk-doc) is that the python2 variant seemed not to have trouble parsing the same files - but switching to py3 causes trouble.
Is python3 itself expecting a .UTF8 locale to be reliably usable?
Reading external string data without an explicit encoding is just plain wrong, both in python2 and in python3, and in any other language. If the program knows some input is UTF-8 (by specification), it should set the encoding to 'utf-8', otherwise it should determine the encoding (e.g. XML allows the specification of the encoding). When communicating with external programs (e.g. using pipes), the calling program should tell the called program which encoding to use (noop if the other program uses a fixed encoding), either via commandline switch or by explicit setting of the locale. Kind regards, Stefan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org