Egmont Koblinger wrote:

> > To cope with the missing feasibility to provide reliable configured 
> > information for terminal behaviour regarding character widths etc., 
> > my editor mined (http://towo.net/mined) performs auto-detection of 
> > terminal properties, so it will know what features the terminal 
> > really has instead of having to guess.
> 
> Could you please provide more information about this auto-detection? I guess
> you're not talking about terminfo capabilities but something different, are
> you? Is there a way to ask the terminal itself (and not the terminfo) about
> the width of a character or about the current cursor position? Afaik it's
> not possible to do it.
Yes, the feature sends selected test strings to the terminal and determines 
their widths. This way it can reliably determine whether it is a UTF-8 
terminal at all, and whether it supports any of the various features, 
like double-width, combining characters, Arabic ligatures, and different 
versions of width data.

> I created a small file:
> { for i in `seq 1 10`; do echo -ne 'a\330\203x'; done; echo; } > somefile
> 
> and tried to edit it with mined in utf8 mode xterm and gnome-terminal. While
> it's okay in gnome-terminal, it's buggy in xterm, mined believes U+0603
> occupies a character cell but in xterm it doesn't. Hence 'char info'
> displays false answer, the cursor can be moved too far to the right, and
> inserting a newline in the middle of the line is visually buggy too.
Yes, there you caught me right at one of the few character positions 
that fail with mined 2000.9 because I missed to update it to cover 
Unicode 4.0.1; sorry for that. I plan to release mined 2000.10 this 
month which fixes this flaw.
I also plan to extract the terminal feature auto-detection into a 
separate library which could be used by other software. Thomas Dickey 
indicated to me that he would consider building it into ncurses.

> These are the issues I'm interested if they can be solved somehow...
Yes, they can. I will give a presentation on mined, featuring Unicode 
capabilities and especially terminal auto-detection, on IUC 27 
(Internationalization and Unicode Conference) in April.

Kind regards,
Thomas

--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to