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

Re: Trying to fix slang



On Wed, Jan 30, 2002 at 09:01:25AM +0000, Phil Blundell wrote:
> > The UTF8 one should support non-UTF8 locales, too. 
> 
> Yes, it does.  There's nothing actually UTF8 specific in the new code;
> it would be better described as "multibyte character aware" or
> something.
>
> The downside to this, for some people, is that you do need to have
> proper locale configuration in situations where it didn't previously
> matter.  In particular, if you want to display top-bit-set characters,
> either for line drawing or iso-8859-? accented characters, you need to
> be in a locale that says this is OK.  Trying this with no locale set or
> an unsuitable one will probably cause the offending characters to go
> missing, perhaps taking other things with them.

I can't get this to work, though.  I just tried it with en_US.CP437, and
mutt still outputs no line drawing characters; there're just spaces.
(I did recompile it with -DUTF8.)

Looking at slang.h, I'm not sure why they even work for UTF-8; it looks
like it hardcodes CP437 values.  I tried adding a UTF8 case, but it uses
a 256-byte table for ACS mapping (for the ncurses interface), which
doesn't work with Unicode line drawing characters being around 0x2500.

I'm also not sure how the old ACS (acsc/enacs/smacs/rmacs) stuff is
supposed to coexist with the current locale/charset paradigm, so I'm not
sure exactly how it's really supposed to work.  (The character set is
really a part of the terminal type, in a sense; if TERM=xterm, it'll get
the ACS definitions, even if it's in UTF-8 and doesn't really have
them.  Whose job is it to nuke those properties?  Terminfo?)

-- 
Glenn Maynard



Reply to: