MCPcopy Index your code
hub / github.com/bpython/bpython / getpreferredencoding

Function getpreferredencoding

bpython/config.py:54–56  ·  view source on GitHub ↗

Get the user's preferred encoding.

()

Source from the content-addressed store, hash-verified

52
53
54def getpreferredencoding() -> str:
55 """Get the user's preferred encoding."""
56 return locale.getpreferredencoding() or sys.getdefaultencoding()
57
58
59def can_encode(c: str) -> bool:

Callers 9

setUpMethod · 0.90
run_with_ttyFunction · 0.90
run_bpythonMethod · 0.90
can_encodeFunction · 0.85
__init__Method · 0.85
insert_into_historyMethod · 0.85
pasteMethod · 0.85
pagerMethod · 0.85

Calls

no outgoing calls

Tested by 3

setUpMethod · 0.72
run_with_ttyFunction · 0.72
run_bpythonMethod · 0.72