Jump to page: 1 2 3
Thread overview
[Issue 12990] utf8 string not read/written to windows console
Jun 27, 2014
Sobirari Muhomori
Jun 27, 2014
Sobirari Muhomori
Jun 27, 2014
Sobirari Muhomori
Jul 03, 2014
Sum Proxy
Jul 07, 2014
Sobirari Muhomori
Jul 07, 2014
Sum Proxy
Aug 15, 2014
Sum Proxy
Oct 25, 2014
Vladimir Panteleev
Oct 25, 2014
Sum Proxy
Oct 25, 2014
Vladimir Panteleev
Oct 25, 2014
Vladimir Panteleev
Oct 25, 2014
Sum Proxy
Oct 25, 2014
Vladimir Panteleev
Oct 25, 2014
Sum Proxy
Oct 25, 2014
Vladimir Panteleev
Oct 25, 2014
Sum Proxy
Oct 26, 2014
Vladimir Panteleev
Oct 28, 2014
Sum Proxy
Oct 28, 2014
Sum Proxy
Oct 28, 2014
Sum Proxy
Mar 22, 2020
Mike Parker
Dec 17, 2022
Iain Buclaw
June 27, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

--- Comment #1 from Sobirari Muhomori <dfj1esp02@sneakemail.com> ---
This bug is probably better to split. It either read an invalid utf-8 string, or couldn't write a valid utf-8 string.

--
June 27, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

--- Comment #2 from Sobirari Muhomori <dfj1esp02@sneakemail.com> ---
import std.stdio, std.utf;

void main()
{
  string s = stdin.readln();
  validate(s);
  write(s);
}

Check if validation passes.

--
June 27, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

--- Comment #3 from sum.proxy@gmail.com ---
I still see no output in the regular console (no exception indication either). However, when I run it with windbg.exe it throws some exception (can't tell which one exactly, couldn't figure out how to load debug symbols). Appears like a write problem to me..

--
June 27, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

--- Comment #4 from Sobirari Muhomori <dfj1esp02@sneakemail.com> ---
Then try
write(cast(ubyte[])s);

--
June 28, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

--- Comment #5 from sum.proxy@gmail.com ---
This time it returned an empty array ([]).

Thanks.

--
July 03, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

--- Comment #6 from Sum Proxy <sum.proxy@gmail.com> ---
I also tried it on a 32-bit windows system and the behavior is the same - no output.

--
July 07, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

--- Comment #7 from Sobirari Muhomori <dfj1esp02@sneakemail.com> ---
An empty array means no input rather than no output. Did it wait for the input? Do you compile it for console or GUI subsystem?

echo 000 | yourprogram.exe
Does this work?

--
July 07, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

--- Comment #8 from Sum Proxy <sum.proxy@gmail.com> ---
Yes, it does wait for the input, but the output is empty. It's a console application and sending the input through pipe seems to work correctly.

--
August 15, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

--- Comment #9 from Sum Proxy <sum.proxy@gmail.com> ---
Sorry, any feedback on this one?

--
October 25, 2014
https://issues.dlang.org/show_bug.cgi?id=12990

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=1448

--- Comment #10 from Vladimir Panteleev <thecybershadow@gmail.com> ---
Try calling SetConsoleCP(65001) and SetConsoleOutputCP(65001).

--
« First   ‹ Prev
1 2 3