qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8


From: Blue Swirl
Subject: Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character
Date: Sun, 14 Dec 2008 14:09:16 +0200

On 12/14/08, Johannes Schindelin <address@hidden> wrote:
> Hi,
>
>  On Sun, 14 Dec 2008, Blue Swirl wrote:
>
>  > On 12/14/08, Johannes Schindelin <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]