2006年07月19日 星期三 11:41
大家好:
我用wxpython做了个程序,想用py2exe打包。现在的问题是程序启动时会从配置文件(utf-8编码)中读取文字,让textctrl
显示出来。
打包后遇到问题就是如果设置值是中文的话,就会出错,信息如下:
File "wx\_controls.pyo", line 1777, in __init__
UnicodeDecodeError: 'gbk' codec can't decode bytes in position 2-3: illegal
multibyte sequence
setup.py中的options:
options = {"py2exe": {"compressed": 1,
"optimize": 2,
"bundle_files": 1,
"packages": ["encodings"],
"excludes": excludes,
"includes": includes}}
请问该如何大包才能正确使用utf-8的文字?
--
Ocean
mail: chocean at gmail.com
homepage: www.oceanisland.com.cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060719/728157b0/attachment.html
Zeuux © 2025
京ICP备05028076号