The Case For Autodecode

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 4 06:38:50 PDT 2016


On 6/4/16 4:57 AM, Patrick Schluter wrote:
> On Friday, 3 June 2016 at 20:18:31 UTC, Steven Schveighoffer wrote:
>> On 6/3/16 3:52 PM, ag0aep6g wrote:

>>> Does it work for for char -> wchar, too?
>>
>> It does not. 0xffff is a valid code point, and I think so are all the
>> other values that would result. In fact, I think there are no invalid
>> code units for wchar.
>
> https://codepoints.net/specials
>
> U+ffff would be fine, better at least than a surrogate.
>

U+ffff is still a valid code point, even if it's not assigned any 
unicode character.

But the result would be U+ff80 to U+ffff, and I'm sure some of those are 
valid code points.

-Steve


More information about the Digitalmars-d mailing list