D-Programming-Language/phobos — pull request #1296 by M-frankied (2013-05-20 12:31:08+00:00)
Title: fix Issue 10125 Unicode non-BMP decoding to dchar in stdio readln

readln!dchar decodes Unicode code point >U+FFFF to 2 surrogates instead of 1
dchar containing the code point.

e.g. U+10001 becomes [0xd800,0xdc01] instead of [0x10001]

strings were first decoded to wchars, each wchar was then separately
decoded to dchar, resulting in 2 dchars in the surrogate block instead
of 1 correct dchar.

added unit test to verify readln decoding of non-ASCII characters