[Haskell-i18n] Unicode in source

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
Thu, 22 Aug 2002 19:51:19 +0000 (UTC)


22 Aug 2002 18:18:28 +0100, Alastair Reid <alastair@reid-consulting-uk.ltd.uk> pisze:

>>> columns) of a given wide character (wchar_t) in the current locale.
>                                                 ^^^^^^^^^^^^^^^^^^^^^
> 
> Can you clarify whether this is because the mapping of wchar_ts onto
> Unicode code points depends on the locale or whether the width of a
> Unicode code point depends on the locale.

Both. But some people argue that this is evil and wcwidth should have
a generally accepted standard meaning, as long as wchar_t is Unicode,
because for terminal emulators etc. it must agree on remote systems
in order to be useful.

http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

> [I'm trying to understand whether we can be sure that the number of
> columns is portable so that different machines will apply the layout
> rule consistently (assuming the translation into UTF8 is consistent).]

In theory no. In practice maybe yes, provided that we use a fixed
table instead of relying on system wcwidth.

-- 
  __("<      Marcin Kowalczyk
  \__/     qrczak@knm.org.pl
   ^^    http://qrnik.knm.org.pl/~qrczak/