[vim/vim] The symbol "﷽" isn't properly displayed (#3491)

32 views
Skip to first unread message

yuri@FreeBSD

unread,
Sep 27, 2018, 9:21:44 PM9/27/18
to vim/vim, Subscribed

How to reproduce:

  • Paste this text into vim: ﷽﷽﷽﷽﷽﷽﷽﷽
  • Observe how individual symbols aren't distinguishable, they overlap and don't look anything like in the browser.

vim-8.1.0342 in the xfce4 terminal on FreeBSD-11.2


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Tony Mechelynck

unread,
Sep 28, 2018, 3:34:18 AM9/28/18
to vim/vim, Subscribed

This is due to the fact that in Vim, one character is one screen cell (or two cells for a "wide" East-Asian character). Now the basmala ligature U+FDFD is one "character" in the Vim sense of the word, but it corresponds to a lot of Arabic "letters", viz. (in some crude Latin letter-for-letter transliteration omitting harakat) bsm allh alrhmn alrhym. There's no way you can pack all this into the screen space meant for one letter and still make it understandable. Browsers, OTOH, use variable-length fonts, especially for highly cursive fonts like Arabic, and they will expand the basmala glyph to use any width it needs.

But don't worry, if you hit ga on that "unreadable" glyph in Vim and it tells you that (in UTF-8 'encoding') it has hex value FDFD, then it is indeed the basmala ligature, even though it is not recognizable in Vim.

Best regards,
Tony.

yuri@FreeBSD

unread,
Sep 28, 2018, 3:38:35 AM9/28/18
to vim/vim, Subscribed

one character is one screen cell (or two cells for a "wide" East-Asian character)

Why doesn't vim expand this, and allow other characters to occupy two cells, or perhaps 3 cells too?

Tony Mechelynck

unread,
Sep 28, 2018, 3:44:51 AM9/28/18
to vim/vim, Subscribed

Mostly history of Vim, and the use of monospace fonts. Vim is not a WYSIWYG text processor, remember, but a plain text editor, which ultimately dates from the time when multi-language was in its infancy, Arabic script rendering was unknown, Chinese was possible but largely reserved to East-Asian editions of the OS. I saw the first steps of the Arabic-in-Unicode module of Vim a few years ago, and AFAIK it still doesn't support Indian-subcontinent scripts like the Devanagari script used for Hindi.

Best regards,
Tony.

Bram Moolenaar

unread,
Sep 28, 2018, 6:00:41 PM9/28/18
to vim/vim, Subscribed

> > one character is one screen cell (or two cells for a "wide" East-Asian character)
>
> Why doesn't vim expand this, and allow other characters to occupy two
> cells, or perhaps 3 cells too?

Sorry, these Arabic characters just don't fit in the mono-spaced system,
which is what Vim is using. Vim doesn't render the glyph, it only tells
the rendering system (often a terminal emulator) to do that, and then
the width is totally unpredictable. On my Terminal it appears to take
about 10 cells. We just don't support that.

--
hundred-and-one symptoms of being an internet addict:
114. You are counting items, you go "0,1,2,3,4,5,6,7,8,9,A,B,C,D...".

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

avidseeker

unread,
Jul 31, 2024, 12:41:03 PM7/31/24
to vim/vim, Subscribed

A possible workaround is to manually insert ~10 spaces after Basmala character. Unless you're programming in Whitespace, you should be fine.

Basmala isn't the only extra-wide Unicode characters. There also

  • DŽ
  • 𒈙
  • 𒅃 𒈓
  • 𒐪

Maybe Vim can insert "virtual non-existent spaces" (something like :tabstop) after such characters?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/3491/2260933949@github.com>

Reply all
Reply to author
Forward
0 new messages