[Issue 1357] Cannot use FFFF and FFFE in Unicode escape sequences.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 3 09:44:04 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1357





------- Comment #14 from matti.niemenmaa+dbugzilla at iki.fi  2007-10-03 11:43 -------
(In reply to comment #13)
> (In reply to comment #12)
> > Much of the problem is D's character types, which really should be 
> > called something like "utf8", "utf16", and "utf32".  It annoys me 
> > to no end that the C standard library purportedly understands 
> > something about UTF-8: the C string type should be ubyte*, not 
> > char*.  But that's just me.
> 
> If we're going to change this, toStringz should return a ubyte* as well.

There's very little chance that such a change will occur. To make it useful,
char (or preferably 'utf8') should implicitly cast to ubyte, or using e.g.
string literals would be a pain. Many programs and libraries, in particular
Phobos and Tango, would also have to make a lot of changes just to compile.
Plus, it'd be another inconsistency between C and D: C 'char' would map to D
'ubyte'.

toStringz's return type would be only one of 100+ changes required.


-- 



More information about the Digitalmars-d-bugs mailing list