On 07/09/12 08:27, Ron Aaron wrote:
Given this text (the character sequence is 200d 05b9):
ֹ
The command:
s/\%u200d\Z/x/g
Gives the result:
xֹ
(0078 200d 05b9)
I would expect the 200d to be replaced with an 'x'.
(I attached the text so you can see it in vim a bit more clearly)
Well, a little context (which wouldn't have hurted in the original post):
U+200D is ZERO WIDTH JOINER, a zero-width character, shown by Vim as
<200d>. This one is not a combining character but a zero-width character
which influences how the characters around it are displayed. For
instance in Arabic it may influence which presentation forms are used.
U+05B9 is HEBREW POINT HOLAM, a Hebrew niqqud vowel sign which appears
as a dot left-above a Hebrew consonant. This one is a combining
character. It represents the vowel "o".
Adding a holam to a zero-width joiner is a little, hm, weird, shall we
say? But, OK, there's no accounting for tastes.
I get the same as you do: the x is inserted before the ZWJ instead of
replacing it; but there is more: with a more "normal" sequence such as
05E7 05B9 (qof-holam) I see exactly the same thing (the x is inserted
before the letter instead of replacing it), and that whether or not
there is something else on the line, and whether or not 'rightleft'
and/or 'delcombine' are set.
I think you have found a bug.
Best regards,
Tony.
--
WOMAN: Well, 'ow did you become king then?
ARTHUR: The Lady of the Lake, [angels sing] her arm clad in the purest
shimmering samite, held aloft Excalibur from the bosom of the
water
signifying by Divine Providence that I, Arthur, was to carry
Excalibur. [singing stops] That is why I am your king!
The Quest for the Holy Grail (Monty
Python)
--
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