Converting char to int

Meta jared771 at gmail.com
Wed Jan 1 12:30:23 PST 2014


On Wednesday, 1 January 2014 at 20:08:24 UTC, Marco Leise wrote:
> Am Wed, 01 Jan 2014 07:27:54 +0000
> schrieb "Meta" <jared771 at gmail.com>:
>
>> Your code is working correctly. D's chars, for all values up 
>> to 255, are the same as the ASCII character set.
>
> UTF-8 reuses the ASCII mapping which is only defined from 0 to
> 127. Everything above is not ASCII and 255 is in fact not even
> defined for UTF-8, which is why it was chosen as the
> initializer for char in D.

Yes, I didn't want to cause confusion talking about ASCII vs. 
Unicode.


More information about the Digitalmars-d-learn mailing list