WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] ctype.h

To: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] ctype.h
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 20 Dec 2005 10:20:20 +0000
Cc: Xen Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 20 Dec 2005 10:17:23 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1135049481.6081.49.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1135049481.6081.49.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 20 Dec 2005, at 03:31, Rusty Russell wrote:

While writing the unit tests for xen/common/lib.c, I found a bug in
islower and isupper.  Character 223 ('ß') should not become 255 ('ÿ')
when lower-cased, or vice versa.  ISO C says in the C locale, nothing
above 127 should be upper or lower case.  However, it's not completely
useless to regard these characters as iso_8859-1, which seems to be the
intent.  Either way, if (islower(c)), then isupper(toupper(c)) must be
true. This is fixed by regarding both 223 and 255 as alpha, but neither
upper nor lower.  We have to use both bits, since all 8 bits are taken.

If it gets fixed in Linux, which is where I pulled that code from originally, then I'll pull down a new copy into Xen. I think it's safe to say right now that no caller in Xen is depending on getting an ISO-mandated result from isupper/islower on chars with the msb set. Maybe when the i18n project for the hypervisor kicks off... ;-)

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>