Quantcast

wrong handling Chinese quote character

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

wrong handling Chinese quote character

moo moo-2
Chinese quote “ and many other characters
let's say "[a]" is the cursor on character "a"
for line:
-> [a]bc“1”
l
-> a[b]c“1”
l
-> ab[c]“1”
l
-> abc[“]1”
l
-> abc[“]1” <- this is wrong, the cursor should move onto "1" already
l
-> abc“[1]” <- now here we are on "1"

“ is actually 1 character, vim somehow treat it as 2 characters

terminal: mintty
os: cygwin or gentoo linux
LANG=zh_CN.UTF-8
vim encoding=utf-8 (reproduced with GBK too)
vim fileencoding=utf-8 (reproduced with GBK too)

utf-8 code of the quote
$ echo -n “ | xxd
0000000: e280 9c                                  ...
utf-8 code of the testing text
$ echo -n abc“1” | xxd
0000000: 6162 63e2 809c 31e2 809d                 abc...1...

and btw, when i start "v" into visual mode after the "wrongly handled"
character, some character is redrawn partly in the line, it's redrawn
in wrong column (x position). i think that's the same problem. we'll
discuss that later if it's still reproduced after this bug is fixed

--
You received this message from the "vim_multibyte" maillist.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe, reply using "remove me" as the subject.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wrong handling Chinese quote character

winterTTr-2


On Wed, Apr 14, 2010 at 11:58 AM, moo moo <moo.wejoin@gmail.com> wrote:
Chinese quote “ and many other characters
let's say "[a]" is the cursor on character "a"
for line:
-> [a]bc“1”
l
-> a[b]c“1”
l
-> ab[c]“1”
l
-> abc[“]1”
l
-> abc[“]1” <- this is wrong, the cursor should move onto "1" already
l
-> abc“[1]” <- now here we are on "1"

“ is actually 1 character, vim somehow treat it as 2 characters

terminal: mintty
os: cygwin or gentoo linux
LANG=zh_CN.UTF-8
vim encoding=utf-8 (reproduced with GBK too)
vim fileencoding=utf-8 (reproduced with GBK too)

utf-8 code of the quote
$ echo -n “ | xxd
0000000: e280 9c                                  ...
utf-8 code of the testing text
$ echo -n abc“1” | xxd
0000000: 6162 63e2 809c 31e2 809d                 abc...1...

and btw, when i start "v" into visual mode after the "wrongly handled"
character, some character is redrawn partly in the line, it's redrawn
in wrong column (x position). i think that's the same problem. we'll
discuss that later if it's still reproduced after this bug is fixed

try to:
set ambiwidth=double


--
You received this message from the "vim_multibyte" maillist.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe, reply using "remove me" as the subject.

--
You received this message from the "vim_multibyte" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wrong handling Chinese quote character

moo moo-2
>
> try to:
> set ambiwidth=double
cool, it's a feature not a bug. thanks

--
You received this message from the "vim_multibyte" maillist.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe, reply using "remove me" as the subject.
Loading...