grub-devel
[Top][All Lists]
Advanced

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

Re: terminal enhancement


From: Marco Gerards
Subject: Re: terminal enhancement
Date: Sun, 19 Sep 2004 11:07:13 +0000
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

"Yoshinori K. Okuji" <address@hidden> writes:

> To support Unicode in the menu interface, I think we need to add one 
> more function into the terminal system. For now, the menu only thinks 
> about ASCII characters. So the number of bytes in a string is identical 
> to the number of columns to be used for displaying the string.
>
> This is not true, generally speaking. In UTF-8, most Latin characters 
> are 2-bytes but one column is used to show each character. Simply 
> speaking, width(string) != length(string).
>
> In POSIX, the function wcwidth is defined to get the width of a string 
> of wide characters. We need a similar function in GRUB.

[...]

> Anyway, you need this kind of function to implement a terminal.
>
> What do you think?

If it is required, I agree.  But I know little about unicode to say
more sane things about this.  I hope you can explain some things to
me.

First of all, why does the terminal has to determine the width?  Isn't
that something generic and how the POSIX function wcwidth (which I
could not find...) works?  What I mean is that the character 'a'
always has the same size, unless you are using some ttf-fonts.  Do you
have bigger characters in mind?

So basically, my question is why POSIX seems to implement it
independent of a terminal while we need to integrate it there.  I'm
sure you are correct about this, but I want to understand this so I
can implement the terminals for the PPC ports properly.

Thanks,
Marco





reply via email to

[Prev in Thread] Current Thread [Next in Thread]