[llvm-bugs] [Bug 37044] New: Unicode string literals

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 7 05:06:43 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37044

            Bug ID: 37044
           Summary: Unicode string literals
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Bumblebritches57 at gmail.com
                CC: llvm-bugs at lists.llvm.org

`\x` Does not work with Unicode characters outside of the BMP for example
U+1F984, and `\u` and `\U` (for UTF-16 and UTF-32) will not work with Unicode
characters in the ASCII range (for example, 0x20, the space).

I'm not entirely sure what to do here, I ran into this problem because I'm
writing a script to parse the Unicode Character Database to create some tables
in C for my library, StringIO.

Example code:

    uint_least32_t Space32_1[]         = U"\x20";
    uint_least32_t Space32_2[]         = U"\U20";
    uint_least32_t Unicorn32_1[]       = U"\x1F984";
    uint_least32_t Unicorn32_2[]       = U"\U1F984";

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180407/1a967e15/attachment.html>


More information about the llvm-bugs mailing list