This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: About the use of cpython console mode problem
Type: behavior Stage: resolved
Components: C API Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: terry.reedy, twoone3
Priority: normal Keywords:

Created on 2020-08-28 04:40 by twoone3, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg376019 - (view) Author: twoone3 (twoone3) Date: 2020-08-28 04:40
When I use the Py_Initialize function in cpython, the console is forced to become gbk encoding, hoping to be compatible with UTF-8
msg376092 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-08-30 00:39
I am replacing the text snippet screenshot with a link to the online doc:
  https://docs.python.org/3/c-api/init.html#c.Py_Initialize

The only encoding python 'forces' in recent Python is utf-8 in utf-8 mode and on some systems.  See https://docs.python.org/3/library/sys.html#sys.getfilesystemencoding.  I am guessing that you are using *nix and that your locale uses gbk.

I am closing because there is no usable description of a bug.  I suggest asking on Python-list about how to do whatever it is you want.  Start with your OS and version.
History
Date User Action Args
2022-04-11 14:59:35adminsetgithub: 85819
2020-08-30 00:39:06terry.reedysetstatus: open -> closed

nosy: + terry.reedy
messages: + msg376092

resolution: not a bug
stage: resolved
2020-08-30 00:13:26terry.reedysetfiles: - Screenshot_2020_0828_104656.png
2020-08-28 04:40:03twoone3create