From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1C8ztZ-0004aS-AI for mharc-grub-devel@gnu.org; Sun, 19 Sep 2004 07:30:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C8ztX-0004aM-GG for grub-devel@gnu.org; Sun, 19 Sep 2004 07:30:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C8ztV-0004Yw-Pj for grub-devel@gnu.org; Sun, 19 Sep 2004 07:30:15 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8ztV-0004Yj-MF for grub-devel@gnu.org; Sun, 19 Sep 2004 07:30:13 -0400 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C8znB-00055H-86 for grub-devel@gnu.org; Sun, 19 Sep 2004 07:23:41 -0400 Received: from localhost (charlie.han.nl [145.74.66.9]) by mail-cn.han.nl (Postfix) with ESMTP id 4750383AD for ; Sun, 19 Sep 2004 13:07:11 +0200 (CEST) Received: from mail-cn.han.nl ([145.74.66.11]) by localhost (charlie.han.nl [145.74.66.9]) (amavisd-new, port 10024) with ESMTP id 08524-01 for ; Sun, 19 Sep 2004 13:07:09 +0200 (CEST) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 8B056832F for ; Sun, 19 Sep 2004 13:07:09 +0200 (CEST) Received: from marco.marco-g.com (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id 507DDC045 for ; Sun, 19 Sep 2004 13:07:09 +0200 (CEST) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <200409181632.21893.okuji@enbug.org> From: Marco Gerards Date: Sun, 19 Sep 2004 11:07:13 +0000 In-Reply-To: <200409181632.21893.okuji@enbug.org> (Yoshinori K. Okuji's message of "Sat, 18 Sep 2004 16:32:21 +0200") Message-ID: <87brg2ms9q.fsf@marco.marco-g.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new@vscan-cn.han.nl Subject: Re: terminal enhancement X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 11:30:15 -0000 "Yoshinori K. Okuji" 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