[PATCH] D46238: [llvm-rc] Add rudimentary support for codepages

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 30 13:59:20 PDT 2018


mstorsjo added a comment.

In https://reviews.llvm.org/D46238#1083353, @amccarth wrote:

> Looks good to me now, but I'm not an official reviewer.
>
> It would be nice if the CP-1252 test exercised one of the unusual characters that you had to build the map for.  Since the sources for the tests are stored as binary files, I'm having a hard time peeking into it from Phabricator, so maybe you did, but it's not obvious.


Yes, I used one of those chars. The test rc file for cp1252 is the following:

  1 "åäö © ƒ \xe5\xe4\366 \251 \x83"
  2 L"åäö © ƒ \xe5\xe4\366 \251 \x0192"

Both produce the same UTF16 string; the first half of the strings is a bunch of literal >= 0x80 values, the other half is producing the same using escape codes. The escape codes in the narrow string are interpreted according to the code page, while escape codes in the wide string map directly to their unicode values. The output of this is four times "E5 00 E4 00 https://reviews.llvm.org/F6 00 20 00 A9 00 20 00 92 01".


https://reviews.llvm.org/D46238





More information about the llvm-commits mailing list