From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBpml-0002jv-4O for qemu-devel@nongnu.org; Sun, 14 Dec 2008 07:09:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBpmi-0002ip-Jf for qemu-devel@nongnu.org; Sun, 14 Dec 2008 07:09:22 -0500 Received: from [199.232.76.173] (port=47380 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBpmh-0002ic-UG for qemu-devel@nongnu.org; Sun, 14 Dec 2008 07:09:20 -0500 Received: from mail-bw0-f12.google.com ([209.85.218.12]:33397) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LBpmh-0000pH-81 for qemu-devel@nongnu.org; Sun, 14 Dec 2008 07:09:19 -0500 Received: by bwz5 with SMTP id 5so3635761bwz.10 for ; Sun, 14 Dec 2008 04:09:17 -0800 (PST) Message-ID: Date: Sun, 14 Dec 2008 14:09:16 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Johannes Schindelin Cc: qemu-devel@nongnu.org On 12/14/08, Johannes Schindelin wrote: > Hi, > > On Sun, 14 Dec 2008, Blue Swirl wrote: > > > On 12/14/08, Johannes Schindelin wrote: > > > > > > On Sun, 14 Dec 2008, Blue Swirl wrote: > > > > > > > Revision: 6023 > > > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6023 > > > > Author: blueswir1 > > > > Date: 2008-12-14 09:30:41 +0000 (Sun, 14 Dec 2008) > > > > > > > > Log Message: > > > > ----------- > > > > Use a hex value instead of possibly ambiguous 8 bit character > > > > > > > > > /me is curious: how could buffer[j] = '\xb0' be ambiguous when buffer is > > > of type char *? It's not as if C did UTF-8 conversion with chars. > > > > The diff does not show it properly, there was a 8 bit character between > > the apostrophes, not \xb0. > > > Right. > > > > One day some compiler might want to parse the source text as UTF-8, then > > byte B0 and apostrophe after it could decode to something different with > > mysterious side effects. > > > This will not be the case unless sizeof(char) will be anything else than > 1. Which will be, uhm, never. Sizeof(char) has nothing to do with this. But if 0xb0 is invalid in UTF-8, then we have nothing to worry, at least until the next invention comes along.