[libvirt] [PATCH] esx: Handle name escaping properly

Eric Blake eblake at redhat.com
Wed Oct 13 14:01:42 UTC 2010


On 10/13/2010 07:19 AM, Daniel Veillard wrote:
>> +    { "A쿀Z", "A+7L+A-Z" },
>
>    Ouch :-)
> One question for the C purists. How do we know how characters outside of
> the ASCII range may be interpreted by a compiler ?

Until C+1x is finalized, we cannot rely on the new Unicode string 
literals U"xxx".  So, the only portable way in C89 or C99 to encode byte 
sequences is with octal or hex escapes, rather than via literal 
characters.  Daniel is right that you cannot portably have 8-bit bytes 
in C source code, because the compilation is then locale-dependent, and 
will do different things depending not only on the compiler, but on the 
locale of the person doing the compilation.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




More information about the libvir-list mailing list