Am Dienstag, 17. Oktober 2017 um 17:50:51, schrieb Guenter Milde <mi...@users.sf.net> > On 2017-10-17, Kornel Benko wrote: > > > Am Dienstag, 17. Oktober 2017 um 00:20:02, schrieb Uwe Stöhr > > <uwesto...@web.de> > >> El 16.10.2017 a las 23:38, Kornel Benko escribió: > > ... > > >> so the SubstituteDataInLine routine does actually not only replace but > >> changes the encoding. > > > No, I think it is the write which tries to change encoding. > > Yes, under Python 3, sys.stdin uses the locale encoding by default. > > ... > > > Read and write text are done according to lokale on your platform. > > However, we can override this in the script. > The following patch makes it work here with Python versions 2.6, 2.7, > 3.3, 3.4, and 3.5. > > Besides ensuring correct encoding in Py2 and Py3, it also simplifies the > code a bit using the power of Python.
Yes, nice. > TODO: find out which encoding is used for the arguments by CMake > (maybe we need the locale encoding) and eventually adapt the argument > parsing: > > arg = arg.decode('UTF-8') # support non-ASCII characters in arguments > > . It is not cmake using wrong encoding, rather the underlying make, or xcode, or whatever. Kornel
signature.asc
Description: This is a digitally signed message part.