[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Peter Maydell
Subject: Re: [PATCH] decodetree: Open files with encoding='utf-8'
Date: Fri, 8 Jan 2021 17:14:29 +0000

On Fri, 8 Jan 2021 at 16:44, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> On 1/8/21 4:38 PM, Peter Maydell wrote:
> > Should we also be opening the output file explicitly as
> > utf-8 ? (How do we say "write to sys.stdout as utf-8" for
> > the case where we're doing that?)
> I have been wondering about it, but the content written
> in the output file is plain C code using only ASCII,
> which any locale is able to process. But indeed maybe
> we prefer ignore the user locale... I'm not sure.

I'm not a python expert so I don't know what the usual thing
is here, but it seems to me better to insulate our build
process from what the user's locale happens to be set to,
even if it happens that we currently only output ASCII.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]