Re: [PATCH v2] decodetree: Open files with encoding='utf-8'

2021-01-08 Thread Yonggang Luo
On Fri, Jan 8, 2021 at 10:58 AM Eduardo Habkost wrote: > > On Fri, Jan 08, 2021 at 07:09:52PM +0100, Philippe Mathieu-Daudé wrote: > > When decodetree.py was added in commit 568ae7efae7, QEMU was > > using Python 2 which happily reads UTF-8 files in text mode. > > Python 3 requires either UTF-8

Re: [PATCH v2] decodetree: Open files with encoding='utf-8'

2021-01-08 Thread Eduardo Habkost
On Fri, Jan 08, 2021 at 07:09:52PM +0100, Philippe Mathieu-Daudé wrote: > When decodetree.py was added in commit 568ae7efae7, QEMU was > using Python 2 which happily reads UTF-8 files in text mode. > Python 3 requires either UTF-8 locale or an explicit encoding > passed to open(). Now that Python

[PATCH v2] decodetree: Open files with encoding='utf-8'

2021-01-08 Thread Philippe Mathieu-Daudé
When decodetree.py was added in commit 568ae7efae7, QEMU was using Python 2 which happily reads UTF-8 files in text mode. Python 3 requires either UTF-8 locale or an explicit encoding passed to open(). Now that Python 3 is required, explicit UTF-8 encoding for decodetree source files. To avoid