prompt-toolkit / pyvim

Pure Python Vim clone.
BSD 3-Clause "New" or "Revised" License
2.53k stars 163 forks source link

UnicodeEncodeError: 'ascii' codec can't encode characters in position 2435-2442: ordinal not in range(128) #58

Closed ekollof closed 9 years ago

ekollof commented 9 years ago

File "/usr/local/bin/pyvim", line 11, in (60,1) - 25% sys.exit(run()) File "/usr/local/lib/python2.7/site-packages/pyvim/entry_points/run_pyvim.py", line 48, in run editor.run() File "/usr/local/lib/python2.7/site-packages/pyvim/editor.py", line 288, in run self.cli.read_input(reset_current_buffer=False) File "/usr/local/lib/python2.7/site-packages/prompt_toolkit/interface.py", line 325, in read_input self.renderer.reset() File "/usr/local/lib/python2.7/site-packages/prompt_toolkit/renderer.py", line 211, in reset self.output.flush() File "/usr/local/lib/python2.7/site-packages/prompt_toolkit/terminal/vt100_output.py", line 166, in flush self.stdout.write(data)

jonathanslenders commented 9 years ago

Hi @ekollof,

Thanks for reporting this bug. Excuse me for replying this late.

I think I fixed the bug in prompt_toolkit. I installed ArchLinux and had the same issue there. https://github.com/jonathanslenders/python-prompt-toolkit/commit/9aa56e741444ff0c2756e531b3a352063b7e99c2

The gray dots to indicate trailing whitespace at the lines did not appear in the ASCII encoding.

jonathanslenders commented 9 years ago

A new version with this fix has been released as well.