[llvm-dev] [BUG] Incorrect ASCII escape characters on Mac

David Woodhouse dwmw2 at infradead.org
Wed Aug 5 07:23:54 PDT 2015


On Wed, 2015-08-05 at 10:02 -0400, Ramkumar Ramachandra wrote:
> 
>   - at 5 = internal global [10 x i8] c"\22\D0\12\F4!\00\15\F9\EC\E1"
>   - at 6 = internal global [10 x i8] c"\D0\19\FB+\FD\F8#\03\E2\11"
>   + at 5 = internal global [10 x i8] c"\22Ð\12ô!\00\15ùìá"
>   + at 6 = internal global [10 x i8] c"Ð\19û+ýø#\03â\11"
> 
> The diff is between Linux and Mac, where lines added are from Mac.
> Both the @5 character sequences represent:
> 
>   34 208 18 244 33 0 21 249 236 225

Not in this century, they don't.

That Ð, for example, is U+00D0 LATIN CAPITAL LETTER ETH, which in any
21st century system should be represented by the UTF-8 bytes 195,144.

Your string "\22Ð\12ô!\00\15ùìá" is much more likely be:
 34 195 144  18 195 180  33   0  21 195 185 195 172 195 161

Your "Linux" version is encoding the bytes directly and not making
assumptions about character sets.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150805/c103c7d3/attachment.bin>


More information about the llvm-dev mailing list