Saturday, 5 December 2015

Python: Get current local encoding

locale.getpreferredencoding(False) is used to get current local encoding.

>>> import locale
>>> locale.getpreferredencoding(False)
'UTF-8'



Previous                                                 Next                                                 Home

No comments:

Post a Comment