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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 3 06:04:24 PDT 2007


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





------- Comment #12 from matti.niemenmaa+dbugzilla at iki.fi  2007-10-03 08:04 -------
You're basically right, that's just my attitude towards types: if it can be
outside the [type.min,type.max] range it shouldn't be stored in type. It's like
storing 119 in a bool just because it's a byte and not a bit of data. You can
do it, but you shouldn't. If there's a possibility that the data is malformed,
you should store it in a meaning-agnostic type like ubyte/uint.

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.

Regarding std.utf correctness, see also Issue 978.


-- 



More information about the Digitalmars-d-bugs mailing list