On Sat, Jan 11, 2020 at 11:03 AM Kyle Stanley <aeros...@gmail.com> wrote:
>
> > 1. Recommend it in the official document "Using Python on Windows" [2].
> > 2. Show the UTF-8 mode status in the command line mode header [3] on 
> > Windows.
> > 3. Show the link to the UTF-8 mode document in the command line mode header 
> > too.
> > 4. Add checkbox to set "PYTHONUTF8=1" environment variable in the installer.
>
> > How do you think?
>
> At the least, I'm in favor of recommending UTF-8 mode in the documentation 
> for Windows users. It seems like it would fit well under the "Configuring 
> Python" section of the page 
> (https://docs.python.org/3/using/windows.html#configuring-python).
>
> I'm undecided on the others, as I don't know what (2) and (3) would 
> specifically entail.

Current header is:

  Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC
v.1916 64 bit (AMD64)] on win32
  Type "help", "copyright", "credits" or "license" for more information.

I'm proposing adding one more line:

  UTF-8 mode is disabled.  (See https://url.to/utf8mode)


> As far as (4) goes:
>
> > If setting "PYTHONUTF8=1" environment variable is too danger
> > to recommend widely, we may be able to add per-installation
> > (and per-venv if needed) option file (site.cfg in the directory same to
> > python.exe) to enable UTF-8 mode.
>
> Would you mind elaborating on this point? In particular, what specific 
> dangers/risks might be associated with setting that specific env var during 
> installation? IIRC, the installer already configures a few others by default 
> (I don't recall their names).
>

If the Python installer set PYTHONUTF8=1 environment variable,
it may affects applications using embeddable Python or py2exe.

So it may break applications which assume the default text
encoding is "mbcs".


> > But it may make Python startup process more complex...
>
> I would definitely prefer to have a checkbox to configure "PYTHONUTF8" during 
> installation rather than requiring it to be done manually, assuming it can be 
> done safely and effectively across different systems. Not only for the sake 
> of lowering complexity, but also because it takes less time and effort. That 
> can add up significantly when you consider the volume of users.
>

Even when we add per-installation config file, we can add it from
the Python installer.


--
Inada Naoki  <songofaca...@gmail.com>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/YCPTZJGHA3TMRPEU7JWQE3PUKICSU3HR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to