A.J.Mechelynck wrote:
Elliot Shank wrote:
I swear I saw something on this list about this before, but I can't
find it. If someone can point me at the prior post, I'd appreciate it.
I've got a utf-8 file with some CJK characters in it. These
characters are being displayed on the line below they are actually on.
'guifont' is set to Courier. The only font that I've got on my
machine that can handle the specific CJK characters I'm looking at is
the Code2000 shareware font from James Kass, so Vim is picking up the
glyph from there. (I.e., none of the CJK fonts that ship as part of
MacOS X can handle it.)
Using the octothorpe to represent the character, I've got a line of
text like this:
blah blah blah "#" blah blah blah blah
but this is displayed as
blah blah blah " " blah blah blah blah
#
I can edit this just fine; this is only a display problem and not a
functionality one. But it's still a pain.
1. What happens if you set your 'guifont' to Code2000 ? (Yeah, I know
it's not a very pretty font, but ugly is better than nothing.)
Ooog. /Everything's/ illegible. It's like only the bottom two pixels of each
character are being displayed.
2. IIUC, 'guifontwide' and (when available) 'guifontset' can be left at
their (empty) defaults, and gvim will attempt to find a suitable font
for wide characters not found in your 'guifont'.
Obviously, since that's the way Vim is displaying the character when 'guifont'
is Courier.
3. I don't know the fine points, but is there an Apple/Macintosh site
from which you could download a "language pack" (or something) for your
OS, to supplement whatever was shipped with it?
I've got all the possible fonts from Apple installed. Googling either turns up
font foundries or sites dealing with MacOS prior to X.
4. gvim can _edit_ any Unicode codepoint, but I'm not sure it can
_display_ codepoints higher than U+FFFF, such as the ideograms in the
"CJK Unified Ideographs Extension B" block, U+20000 to U+2A6DF. Here on
my gvim running on SuSE Linux, I have several nice-looking CJK fonts,
but those "high" codepoints all display as a "wide" question mark glyph
in gvim.
Everything I'm concerned about fits into 16 bits, so this isn't a problem. But
it is the upper end of 16 bits, which are the more recent blocks that I don't
think apps have been dealing with much, even though they've been in the
standard for a good number of years now. I still don't understand how things
like the Win32 API are dealing with 17 or more bit characters, unless Microsoft
has produced a third variant of everything that accepts UTF-8 or UTF-16; I
don't think many people would go along with fixed 32 bit characters.
I'm only dealing with a little bit of CJK text, so I can live with the
situation.