google / ci_edit

A terminal text editor with mouse support and ctrl+Q to quit.
Apache License 2.0
223 stars 54 forks source link

'str' object has no attribute 'decode' , Chinese user #200

Closed Ghaker closed 5 years ago

Ghaker commented 5 years ago

python3 --version Python 3.7.3

Ghaker commented 5 years ago

I edit ci.py use python not python3, and then I can input Chinese. but It can not support Chinese perfectly. image The cursor is not at correct position.

dschuyler commented 5 years ago

I made a fix for moving the cursor left and right over double wide characters (such as Chinese characters). I suspect that there will be other related bugs. Please let me know!

Ghaker commented 5 years ago

first, python3 can not support Chinese ,when I input Chinese(input 'n' 'i' '<space>') ,It will crash,so I used python2,my environment

图片 图片

usually,almost Chinese use sougou inputting method;,and I use mac native inputting method

图片

It seems to be the same.I input 'nihao' . I can't see character '你'.

图片

And I need entering <delete> twice.

Ghaker commented 5 years ago

@dschuyler