_bootlocale.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:aweasome_learning 作者: Knight-ZXW 项目源码 文件源码
def getpreferredencoding(do_setlocale=True):
            assert not do_setlocale
            result = _locale.nl_langinfo(_locale.CODESET)
            if not result and sys.platform == 'darwin':
                # nl_langinfo can return an empty string
                # when the setting has an invalid value.
                # Default to UTF-8 in that case because
                # UTF-8 is the default charset on OSX and
                # returning nothing will crash the
                # interpreter.
                result = 'UTF-8'
            return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号