Bug 13696 – Missing entry for unicode code point literals on the lexer page
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-11-07T10:43:00Z
Last change time
2014-11-29T17:02:55Z
Keywords
pull, spec
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2014-11-07T10:43:47Z
An excerpt from Ali's book:
-----
http://ddili.org/ders/d.en/characters.html
Specifying the Unicode values of the characters by using the \ufour_digit_value syntax for wchar, and the \Ueight_digit_value syntax for dchar. (Note u vs. U.) The Unicode values must be specified in hexadecimal:
wchar Ğ_w = '\u011e';
dchar Ğ_d = '\U0000011e';
These methods can be used to specify the characters within strings as well. For example, the following two lines have the same string literals:
writeln("Résumé preparation: 10.25€");
writeln("\x52\ésum\u00e9 preparation: 10.25\€");
-----
This info is missing on our lexer page:
http://dlang.org/lex.html