[Issue 13686] Reading unicode string with readf ("%s") produces a wrong string
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Nov 5 10:46:42 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13686
ag0aep6g at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ag0aep6g at gmail.com
Component|DMD |Phobos
Hardware|x86_64 |All
OS|Windows |All
Severity|enhancement |normal
--- Comment #4 from ag0aep6g at gmail.com ---
Copying my comment from the forum thread:
std.stdio.LockingTextReader is to blame:
void main()
{
import std.stdio;
auto ltr = LockingTextReader(std.stdio.stdin);
write(ltr);
}
----
$ echo Тест | rdmd test.d
ТеÑÑ
LockingTextReader has a dchar front. But it doesn't do any
decoding. The dchar front is really a char front.
--
More information about the Digitalmars-d-bugs
mailing list