unittest
{
char[] chars = ['à','è','ì'];
assert(chars == "àèì");
}
The assertion fails for the obvious reason there's no room in chars for the multibyte characters. The initialization should not compile because it attempts to truncate wide characters into meaningless bytes.
Comment #1 by hoganmeier — 2011-11-22T12:19:23Z
It's more general:
void main()
{
char a = 'ä'; // compiles fine
}
Comment #2 by yebblies — 2012-01-31T19:48:05Z
*** This issue has been marked as a duplicate of issue 6458 ***