Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1DpZsp-00040R-GS for mharc-grub-devel@gnu.org; Mon, 04 Jul 2005 18:57:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DpZsk-0003x9-Rp for grub-devel@gnu.org; Mon, 04 Jul 2005 18:57:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DpZse-0003vS-LQ for grub-devel@gnu.org; Mon, 04 Jul 2005 18:57:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpZse-0003pY-HL for grub-devel@gnu.org; Mon, 04 Jul 2005 18:57:36 -0400 Received: from [212.43.237.68] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DpZjw-00061b-Vv for grub-devel@gnu.org; Mon, 04 Jul 2005 18:48:37 -0400 Received: from ASSP-nospam (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 962EAFA4CD36 for ; Tue, 5 Jul 2005 00:42:30 +0200 (CEST) Received: from 127.0.0.1 ([127.0.0.1] helo=ip6-localhost) by ASSP-nospam ; 4 Jul 05 22:42:30 -0000 From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Tue, 5 Jul 2005 00:42:25 +0200 User-Agent: KMail/1.7.2 References: <42C84FF8.8020102@yahoo.fr> In-Reply-To: <42C84FF8.8020102@yahoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507050042.25708.okuji@enbug.org> Subject: Re: [PATCH] Small unicode problem fix in normal/menu.c 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: Mon, 04 Jul 2005 22:57:44 -0000 On Sunday 03 July 2005 22:52, Vincent Pelletier wrote: > There is an alignment problem when menu is drawn with Unicode chars in > titles : there aren't enough spaces written on the right to make the > hilight fill horizontaly the menu. You can check in this patch, but this is not the right thing to do. At the moment, it is impossible to know how many columns will be occupied by putting a byte until it is actually putted. This is very bad, and, of course, does not work well in some cases. So, as I described before, it is necessary to implement a new function which returns the width for a given (Unicode) character. For the menu, I think it would be easier to convert all strings to Unicode strings before rendering. Writing bytes is very, very hard. Okuji