字符编码 - python的tkinter的Text组件中文本编码的问题
PHP中文网
PHP中文网 2017-04-17 15:04:03
0
2
980

首先我不知道这个算不算是字符编码问题..
是这样,我用tkinter的text组件画了一个文本框,在切换到搜狗输入法的时候,按backspace键来删除,发生了很奇怪的情况,如图所示:

就是按一下backspace,就会变成一个类似“口”的符号,之后再按backspace就不无法删除了,然后关掉搜狗输入法,按backspace又能够正常删除了,这是什么原因呢?

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
PHPzhong

Add # -- coding: utf-8 -- to the header of each python file to indicate that the python interpreter uses UTF-8 encoding for the character processing set in this file.
When you input Chinese characters, make sure your Sogou input method is not in full-width mode. The Chinese character set should be set to half-width mode

黄舟

There is no way around it. It works in XP or Win7. This phenomenon also occurs when I use Win8.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!