isValidDchar

Chris Miller chris at dprogramming.com
Mon May 29 19:50:32 PDT 2006


The documentation says "\uFFFE and \uFFFF are considered valid by this  
function, as they are permitted for internal use by an application, but  
they are not allowed for interchange by the Unicode standard.".

But this does not seem to be propagated to other things:


wchar foo = '\uFFFF';

// DMD output: invalid UTF character \U0000ffff


wchar[] s = "foobar";
wchar ch = 0xFFFF; // OK
s ~= ch;
std.utf.validate(s);

// Error: illegal UTF-16 value


Furthermore, if possible, perhaps all the char, wchar and dchar init`s  
should be the same illegal value so that (dchar.init == char.init), and  
other combinations.



More information about the Digitalmars-d mailing list