> But for the following case, it is complete wrong if it crash at line 3: > 1: char[] c = [0xA0]; > 2: string s = c.idup; > 3: foreach(dchar d; s){} > The expected result is either: > a) crash at line 2, c is not valid utf and can't be converted to string > or: > b) don't crash, and d = 0xDCA0;
I agree with a), but not b), Can't find anything in unicode standard says you can use the low surrogate like that