Converting Unicode Escape Sequences to UTF-8
Nordlöw via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Oct 22 12:16:32 PDT 2015
On Thursday, 22 October 2015 at 19:13:20 UTC, Nordlöw wrote:
>> * Drop the backslash and the 'u'.
>> * Parse XXXX as a hexadecimal integer, and cast to dchar.
>> * Use std.utf.encode to convert to UTF-8. std.conv.to can
>> probably do it
>> too, and possibly simpler, but would allocate.
>>
>> Also be aware of the longer variant with a capital U:
>> \UXXXXXXXX (8 Xs)
Can somebody point out in which function/file DMD does this
decoding?
More information about the Digitalmars-d-learn
mailing list