Ken Takata wrote:
> :py3 vim.eval() doesn't handle multibyte characters properly
> when 'encoding' is not utf-8 (e.g. cp932).
>
> How to reproduce:
>
> :set enc=cp932
> :call setline(1, "\u82a0") " Set Hiragana Letter A 'あ' (U+3042 in Unicode)
> :py3 import vim
> :py3 print(vim.eval('getline(1)')) " Printing 'あ' is expected.
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 0:
> invalid start byte
>
> Attached patch fixes this problem.
> Please check it.
Thanks, I'll include it.
--
Communication is one of the most compli..., eh, well, it's hard.
You know what I mean. Not?
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.