https://issues.dlang.org/show_bug.cgi?id=14627
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from [email protected] --- The issue of dchar.max versus uint.max has been discussed on the forums: http://forum.dlang.org/thread/[email protected] It was decided that D compilers must support dchar values which are outside the range of valid Unicode code points; otherwise handling encoding errors and the like gets very awkward. Besides, actually enforcing a range less than that which is actually representable by the binary format of dchar would be very difficult to do in a performant way. In light of this, I think #1 (Make dchar.max == uint.max) is the correct solution. Allowing dchar.max to be less than its true maximum has probably caused subtle bugs in some generic code. The value of the maximum code point (0x10FFFF) should be moved to a separate constant. --
