CppOrJava 最近的时间轴更新
CppOrJava

CppOrJava

V2EX 第 40506 号会员,加入于 2013-06-12 15:42:12 +08:00
CppOrJava 最近回复了
@VoldikSS 是没有办法吗
2018-11-03 20:25:19 +08:00
回复了 CppOrJava 创建的主题 Python 用 antiword 将 doc 转换成 txt,怎么解决返回结果中文乱码问题?
@lihongjie0209 Linux 和 Windows 下 git bash 是正常的
其实感觉跟 antiword 关系更大一些, cmd 下 chcp 65001 后 antiword 的输出仍然会有乱码
但在 git bash 下调用 antiword, 就不会输出乱码
2018-11-03 20:19:59 +08:00
回复了 CppOrJava 创建的主题 Python 用 antiword 将 doc 转换成 txt,怎么解决返回结果中文乱码问题?
@lihongjie0209 我试过改 locale,没有用
代码:

locale.setlocale(locale.LC_ALL, 'zh_CN.UTF-8')
locale.setlocale(locale.LC_COLLATE,'zh_CN.UTF-8')
locale.setlocale(locale.LC_CTYPE,'zh_CN.UTF-8')
locale.setlocale(locale.LC_NUMERIC,'zh_CN.UTF-8')
locale.setlocale(locale.LC_MONETARY,'zh_CN.UTF-8')
locale.setlocale(locale.LC_TIME,'zh_CN.UTF-8')
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   946 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 20:49 · PVG 04:49 · LAX 13:49 · JFK 16:49
Developed with CodeLauncher
♥ Do have faith in what you're doing.