All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Gerards <metgerards@student.han.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: terminal enhancement
Date: Sun, 19 Sep 2004 11:07:13 +0000	[thread overview]
Message-ID: <87brg2ms9q.fsf@marco.marco-g.com> (raw)
In-Reply-To: <200409181632.21893.okuji@enbug.org> (Yoshinori K. Okuji's message of "Sat, 18 Sep 2004 16:32:21 +0200")

"Yoshinori K. Okuji" <okuji@enbug.org> 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	other threads:[~2004-09-19 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-18 14:32 terminal enhancement Yoshinori K. Okuji
2004-09-19 11:07 ` Marco Gerards [this message]
2004-09-19 14:35   ` Yoshinori K. Okuji
2004-09-19 14:51     ` Marco Gerards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87brg2ms9q.fsf@marco.marco-g.com \
    --to=metgerards@student.han.nl \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.