Bug#784330: game-data-packager without arguments refuses to run due to Python error
Alexandre Detiste
alexandre.detiste at gmail.com
Wed May 6 13:08:02 UTC 2015
Le mardi 5 mai 2015, 19:37:36 Simon McVittie a écrit :
> On 05/05/15 15:18, Alexandre Detiste wrote:
> > Would something like this be ok ?
>
> > + longname = self.longname.replace('ł','l')
>
> Ugh, I'd rather not special-case the non-ASCII characters that happen to
> appear in the names of games that we support...
Ok, it's ugly, but at least it's hidden in a function in util.py;
this function is also called by check_syntax.py .
> but perhaps this is a necessary evil in the short term.
I had been updating the same system since 2002,
and was stuck with Latin-1 encoding;
it was quite a bit of work to rename all the files to uft8,
I understand some people never bother to change the locale.
This patch only implement ascii vs utf8; people still
using Latin-2 (Eastern European) encoding will
be served ascii "Soltys" too.
Proper handling would need a
str.encode(sys.stdout.encoding) in a try/except
block + testing with this locale configured; for little gain.
> Having the wrapper shell script set something like
> PYTHONIOENCODING=":replace" if it detects
> the C locale might also be a
> reasonable workaround.
That replaces the characters with '?'s
More information about the Pkg-games-devel
mailing list