Implicit encoding conversion on string ~= int ?
Adam D. Ruppe
destructionator at gmail.com
Sun Jun 23 08:46:42 PDT 2013
I think what's happening is the compiler considers chars to be
integral types (like they were in C), which means some implicit
conversions between char, int, dchar, and others happen.
So
char[] a;
int b = 1000;
a ~= b;
the "a ~= b" is more like "a ~= cast(dchar) b", and then dchar ->
char means it may be multibyte encoded, going from utf-32 to
utf-8.
More information about the Digitalmars-d
mailing list