While debugging on gcc, I found that the Unicode literal u"万不得已"
was represented as u"\007\116\015\116\227\137\362\135"
. Which makes sense -- 万
is 0x4E07, and 0x4E in octal is 116.
Now on Apple LLVM 9.1.0 on an Intel-powered Macbook, I find that that same literal is not handled as the same string, ie:
u16string{u"万不得已"} == u16string{u"\007\116\015\116\227\137\362\135"}
goes from true
to false
. I'm still on a little-endian system, so I don't understand what's happening.
NB. I'm not trying to use the correspondence u"万不得已"
== u"\007\116\015\116\227\137\362\135"
. I just want to understand what's happening.