Hi,
At Wed, 11 Apr 2001 13:36:53 +0200,
Bram Moolenaar <[EMAIL PROTECTED]> wrote:
> Markus Kuhn wrote:
> > It would just mean that the definition of wcwidth becomes an
> > actual design issue, and not just like it is at the moment a function
> > rather strictly derived from a Unicode database property. I also suspect
> > that Japanese users will not really want to insist on doublewidth
> > European letters.
AFAIK, CJK world is the only region which has used distinction of
single and double width. Thus, width is a compatibility problem
for CJK people. Since this concept is new for other people, width
is mere a design problem for non-CJK people.
Thus, we need multiple definitions of width. Note that these
definitions should be achieved by locale definition, as Markus
suggested.
> I'm confused. I thought that the width of a Unicode character was fixed.
> Thus when I take a Unicode character, it is either defined to be single-width
> or double-width.
>
> If this is not true, I won't be able to edit Unicode with Vim reliably. I'm
> using the current version of wcwidth(). When someone decides to make a font
> with different widths, the display will be messed up. I suppose xterm has the
> same problem. Running Vim in a xterm has a double problem (Vim can only guess
> which characters will end up double-width in the xterm).
Vim can work reliably, if all software rely on wcwidth(). Note that
the actual value of wcwidth() may change depending on locale. However,
if all softwares (in this case, Vim and XTerm) rely on the same wcwidth(),
it works well.
XTerm-152-27 uses wcwidth() in the default -lc mode. (In -u8 mode,
it uses Markus' implementation of wcwidth(). This is a makeshift
for systems whose UTF-8 locales have good definition of character
width or systems which don't have wcwidth(). In future, UTF-8 can
be used via -lc mode in UTF-8 locales and system's wcwidth() will
be used.)
---
Tomohiro KUBOTA <[EMAIL PROTECTED]>
http://surfchem0.riken.go.jp/~kubota/
"Introduction to I18N"
http://www.debian.org/doc/manuals/intro-i18n/
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/