MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / getencoding

Function getencoding

tools/python-3.11.9-amd64/Lib/locale.py:653–662  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

651 from _locale import getencoding
652except ImportError:
653 def getencoding():
654 if hasattr(sys, 'getandroidapilevel'):
655 # On Android langinfo.h and CODESET are missing, and UTF-8 is
656 # always used in mbstowcs() and wcstombs().
657 return 'utf-8'
658 encoding = getdefaultlocale()[1]
659 if encoding is None:
660 # LANG not set, default to UTF-8
661 encoding = 'utf-8'
662 return encoding
663
664try:
665 CODESET

Callers 1

getpreferredencodingFunction · 0.85

Calls 1

getdefaultlocaleFunction · 0.85

Tested by

no test coverage detected