Re: [Debian BTS] ru_RU.UTF-8 locale

Hello, Jakub!

> On Mon, Feb 24, 2003 at 11:49:14AM +0100, Adam Byrtek / alpha wrote:
> > Hi, I know there are several people here which use the Russian locale.
> > Could you please try to reproduce this bug report or tell me whether I
> > can close it? Maybe this guy just doesn't know how to configure
> > UTF-8 terminal properly? Unfortunately I can't contact him...

The problem is that gettext returns strings in UTF-8, and they are passed
to the screen library (S-Lang or ncurses), that is supposed to show those
strings correctly.  Part of the problem is the need to measure the actual
length of the string as displayed on the screen.  It's not trivial for
UTF-8 because we may have one or two bytes representing one symbol.  Not
to mention that some symbols (e.g. Chinese) can be twice as wide as Latin

I also don't feel it's such a good idea to use locale to figure out the
properties of the terminal.  The locale is meant to define locale-specific
preferences of the user, not the properties of any software.

Maybe it's better to use ncurses instead of S-Lang for the build with
UTF-8 support?  ncurses has a longer history of supporting Unicode.
Also, it is developed by Thomas Dickey, who also maintains xterm and
terminfo.  If there are any issues with the standards (like the one I just
mentioned), he is the person who can do something.

S-Lang is basically a clone of ncurses, when in comes to the library part
(the S-Lang language is not a clone).  It's easier to change S-Lang to
match ncurses than to change S-Lang and try to change ncurses to match.

> mc doesn't work in UTF-8 locales. A few days I hacked mc up so that at
> least the things I use often in mc sort-of work with UTF-8, you can find
> the patch in

First of all, to override the check for UTF-8 S-Lang, use
--with-screen=slang instead of hacking configure.

It would be nice if you commented your patches.  I may consider applying
some of them.  I really don't understand why /bin/rm is better than rm.

> But view is not done at all and there is still a lot of places which
> need changing. The first thing to decide is what all locales mc wants to
> support. E.g. supporting just ASCII compatible charsets (like UTF-8) is
> easier than supporting ASCII incompatible ones.

I think we can limit ourselves to the ASCII compatible charsets for now.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]