On Sun, 3 Jul 2011, ZyX wrote:
Reply to message «Cursor/rendering position bug handling unicode devanagari
characters»,
sent 10:52:42 03 July 2011, Sunday
by Paul.W Harvey:
Hi there,
Normally I happily live in a 7-bit ASCII world, but recently I've
become involved in writing unicode tests for a perl project, Foswiki.
I think I've discovered a cursor positioning/rendering bug in vim 7.2
with devanagari script (used for Hindi language).
Here's the offending line (also at http://pastebin.com/tWSTnAdw):
my @test = ( 'wiki', 'â日本語é', 'çमानक हिन्दीà' );
1. The problem is with the devanagari characters. There's only six of
them: but 9-ish (3 extraneous circle things) are displayed
2. Go to end of line
3. Observe that cursor doesn't go completely to end of line. Cursor
goes to closing quote ' only
4. Move cursor left, character-at-a-time (arrow or h)
5. Before you've reached the Kanji characters, one of the devanagari
characters is replaced with an extraneous ')'
I'm using gnome-terminal with these envars set:
GDM_LANG="en_AU.utf8"
LANG="en_AU.utf8"
nano, cat and less all seem to work fine.
My vim is from debian-testing, output of vim --version begins with:
[...trimmed...]
Cheers
--
[email protected], Ph: (02) 6246 5105
Informatics Technologist - www.taxonomy.org.au
Centre for Australian National Biodiversity Research
Confirmed, but what exactly happens depends on the terminal: I observe
different bugs in yakuake (konsole) and urxvtc. Some problems happen
in gvim, but they are not that large: only when I switch from last but
one character before last «'» to previous one I get additional thick
black line to the left of last character before «'», which disappears
once I redraw or hide this text by placing another window (X window,
not gvim one) on it and then unhide it.
By the way, in console semicolon turns into colon because it is for
some reason moved some pixels down: even when displayed using `xclip
-o -sel clip'.
Editing of this line in zsh happens almost normally compared to vim:
in konsole moving the cursor causes characters to change their
vertical position and, sometimes, their shape, in urxvtc there are no
problems at all, but almost all characters from the last string appear
as rectangles.
I originally wrote this¹ up (on the web since email's the wrong place
for HTML and images) in response to a post «Complex Scripts in
Vim/gVim»², but figured it was appropriate here, since Devanāgarī is the
topic again. The summary is that you're probably not going to be happy
with the way vim (g- or terminal) displays Devanāgarī at this point in
time, especially if you really have to read/write it (instead of just
viewing it as a sequence of characters for Unicode testing).
Various things sidetracked me, preventing me from sending the response
originally. I didn't have a nice way to edit the annotations³ I tried
to play with (never finished all of them). I tried and failed to get
LuaTeX to find the Devanāgarī fonts (from what I've seen, it's good
about handling the diacritics).
Takeaways beyond the pessimistic ones above:
Chrome seems to render the Devanāgarī text snippet from that thread
reasonably well. The shiro-rekha (line above) is unbroken, the
diacritics are in the right places in the Devanāgarī AFAICT (but not the
double-diacritics on the Latin chars).
I'd welcome suggestions. E.g. re: ZyX's comment that yakuake looked
okay, the sample from before⁴ looked completely wrong in Konsole, but
I'll try again once Paludis updates a zillion things (haven't up'ed my
system in a long time) and I can install yakuake. Comments on the fonts
I ended up using are in my Yudit preferences⁵. I'm also on Gentoo, so
specific packages that made the new sample look fine in yakuake would be
particularly useful for me.
--
Best,
Ben
¹: http://benizi.com/vim/devanagari/
²: https://groups.google.com/d/topic/vim_dev/zPLhQ_AwFGI/discussion
³: http://code.google.com/p/jquery-image-annotate/
⁴: http://benizi.com/vim/devanagari/snippet.txt
⁵: http://benizi.com/vim/devanagari/yudit-hindi.properties.html#fonts
--
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