On 03/24/12 at 13:07 +0100, björn wrote:
> On Tue, Mar 20, 2012 at 11:30 PM,  wrote:
> > I think There is a bug in MacVim regarding multibyte characters.  It
> > only happens when the Experimental Renderer is turned ON.
> >
> > To reproduce:
> >
> > 1. make a new folder "bar".
> > 2. In bar, do "touch föo", where there is an umlaut over the first 'o'.
> > 3. Start MacVim with mvim -u NONE -U NONE.
> > 4. In MacVim, do "cd bar".
> > 5. Now do ":r !ls".
> > 6. Put a couple of blank lines after the result of that.
> > 7. Now do :let @a=glob("*"), followed by :put a
> >
> > Expected behavior: There should be two instances of "föo" in the buffer.
> >
> > Actual behavior: Depending on what your value of 'gfn' is, you might see
> > that one of the "föo" lacks an umlaut.  For instance, if you use
> > Consolas or Monaco, the one that was the result of "ls" (i.e., the top
> > one) will lack an umlaut while the bottom one will look correct.  If you
> > use Courier New or Menlo, then both words have the umlaut.
> >
> > Actual behavior part 2: Here's where it gets weird.  Navigate to each of
> > the "o" that are supposed to have an umlaut (the first of each pair) and
> > do "ga".  Vim's feedback for the top-foo (which came from ls) is:
> >
> > <o>  111,  Hex 6f,  Octal 157 < ̈> 776, Hex 0308, Octal 1410
> >
> > Vim's feedback for the bottom-foo (which came from glob()) is:
> >
> > <ö> 246, Hex 00f6, Octal 366
> 
> This has to do with Unicode normalization [1].  The output from !ls is
> not composed, whereas when you paste it in Vim it is composed.  The
> problem arises because you are piping characters from an external
> command.
> 
> I suppose we could try to normalize all input from external commands
> but the problem is that it need not be in Unicode format so this may
> cause new problems and/or be slower.  I'll put a note on my todo list.
> 
> Björn
> 
> [1] http://en.wikipedia.org/wiki/Unicode_equivalence#Normalization

Hi Björn,

Thanks for putting this on the TODO list.  I just want to clear up a bit of
confusion on my part.

I thought that (1) the outputs of both ":r !ls" and glob() should be
indentical, and also that (2) they should both do it the way that !ls does it.
The reason I think this is because that's how "true" console vim (from Bram's
hg repo) does it, and we want to stay as much like true vim as is humanly
possible.

Is this right?

If it is right, then what would need fixing is the output of glob(), not that
of !ls.  It seemed to me in your message that you were thinking about
tinkering with !ls (and pipe-ins generally), but I wasn't sure.

It also now seems that the non-showing of umlauts (depending on the font) is
really a separate bug, probably in the experimental renderer; this separate
bug was only *revealed* by MacVim's treating !ls and glob() differently, not
caused by it.

-gmn

-- 
You received this message from the "vim_mac" 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

Reply via email to