On this page
sys.getdefaultencoding
Prev: sys.getallocatedblocks | Up: sys | Next: sys.getdlopenflags
Rel: sys.activate_stack_trampoline, sys.addaudithook, sys.audit, sys.breakpointhook
Ref: docs.python.org — sys.getdefaultencoding
Tags: #public #python3 #stdlib #sys
Import
import sys
from sys import getdefaultencoding
Signature & Overview
sys.getdefaultencoding()
Return the current default encoding used by the Unicode implementation.
Usage
import sys
assert sys.getdefaultencoding() == "utf-8"
Gotchas
- Always
"utf-8"in Python 3: Unlike Python 2, there is nosetdefaultencoding().
REPL Inspect
from sys import getdefaultencoding
help(getdefaultencoding)
Linked from
Related notes
- tuts/python3/stdlib_module/sys/getallocatedblocks Linked here; links to this page; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/getdlopenflags Linked here; links to this page; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sys/activate_stack_trampoline Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/addaudithook Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/audit Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/breakpointhook Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/call_tracing shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/deactivate_stack_trampoline shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/displayhook shared tags: #stdlib, #sys