Re: [Qemu-devel] [PATCH v2 2/2] qapi: open files in binary mode and use explicit decoding/encoding in common.py

2018-06-15 Thread Matthias Maier
On Fri, Jun 15, 2018, at 10:31 CDT, Markus Armbruster wrote: > If I understand 7.2.3. Standard Encodings[*] correctly, the canonical > name is "utf-8". Let's use that. Wait, it's the default, no need to > pass an argument. Roger. I will change this in v3.

Re: [Qemu-devel] [PATCH v2 2/2] qapi: open files in binary mode and use explicit decoding/encoding in common.py

2018-06-15 Thread Markus Armbruster
Matthias Maier writes: > This is a different approach to fix the locale dependent encode/decode > problem in common.py utilizing the binary read/write mode [1,2] and > decode/encode with explicit UTF-8 encoding arguments [3]. Why can't we simply pass encoding='utf-8' to open()? > This approach

[Qemu-devel] [PATCH v2 2/2] qapi: open files in binary mode and use explicit decoding/encoding in common.py

2018-06-14 Thread Matthias Maier
This is a different approach to fix the locale dependent encode/decode problem in common.py utilizing the binary read/write mode [1,2] and decode/encode with explicit UTF-8 encoding arguments [3]. This approach is preferred over the fix in commit d4e5ec877ca because it is (a) locale independent, a