Re: Strange behavior in console with UTF-8

2016-03-28 Thread Jonathan Villa via Digitalmars-d-learn
On Monday, 28 March 2016 at 18:28:33 UTC, Steven Schveighoffer wrote: On 3/27/16 12:04 PM, Jonathan Villa wrote: I can reproduce your issue on windows. It works on Mac OS X. I see different behavior on 32-bit (DMC stdlib) vs. 64-bit (MSVC stdlib). On both, the line is not read properly (I

Re: Strange behavior in console with UTF-8

2016-03-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/27/16 12:04 PM, Jonathan Villa wrote: On Saturday, 26 March 2016 at 16:34:34 UTC, Steven Schveighoffer wrote: On 3/25/16 6:47 PM, Jonathan Villa wrote: On Friday, 25 March 2016 at 13:58:44 UTC, Steven Schveighoffer wrote: [...] OK, the following inputs I've tested: á, é, í, ó, ú, ñ, à,

Re: Strange behavior in console with UTF-8

2016-03-27 Thread Jonathan Villa via Digitalmars-d-learn
On Saturday, 26 March 2016 at 16:34:34 UTC, Steven Schveighoffer wrote: On 3/25/16 6:47 PM, Jonathan Villa wrote: At this point, I think knowing exactly what input you are sending would be helpful. Can you attach a file which has the input that causes the error? Or just paste the input into

Re: Strange behavior in console with UTF-8

2016-03-27 Thread Jonathan Villa via Digitalmars-d-learn
On Saturday, 26 March 2016 at 16:34:34 UTC, Steven Schveighoffer wrote: On 3/25/16 6:47 PM, Jonathan Villa wrote: On Friday, 25 March 2016 at 13:58:44 UTC, Steven Schveighoffer wrote: [...] OK, the following inputs I've tested: á, é, í, ó, ú, ñ, à, è, ì, ò, ù. Just one input is enough to

Re: Strange behavior in console with UTF-8

2016-03-26 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/25/16 6:47 PM, Jonathan Villa wrote: On Friday, 25 March 2016 at 13:58:44 UTC, Steven Schveighoffer wrote: On 3/24/16 8:54 PM, Jonathan Villa wrote: [...] D's File i/o uses C's FILE * i/o system. At least on Windows, this has literally zero support for wchar (you can set stream width,

Re: Strange behavior in console with UTF-8

2016-03-25 Thread Jonathan Villa via Digitalmars-d-learn
On Friday, 25 March 2016 at 13:58:44 UTC, Steven Schveighoffer wrote: On 3/24/16 8:54 PM, Jonathan Villa wrote: [...] D's File i/o uses C's FILE * i/o system. At least on Windows, this has literally zero support for wchar (you can set stream width, and the library just ignores it). What

Re: Strange behavior in console with UTF-8

2016-03-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/24/16 8:54 PM, Jonathan Villa wrote: I prefer to post this thing here because it could that I'm doing something wrong. I'm using std.stdio -> readln() to read whatever I'm typing in the console. BUT, if the line contains some UTF-8 characters, the data obtained is EMPTY and module

Re: Strange behavior in console with UTF-8

2016-03-24 Thread Jonathan Villa via Digitalmars-d-learn
On Friday, 25 March 2016 at 01:03:06 UTC, Ali Çehreli wrote: > Try char: char[] readerBuffer; Ali Also tried with dchar ... there's no changes.

Re: Strange behavior in console with UTF-8

2016-03-24 Thread Jonathan Villa via Digitalmars-d-learn
On Friday, 25 March 2016 at 01:03:06 UTC, Ali Çehreli wrote: On 03/24/2016 05:54 PM, Jonathan Villa wrote: Try char: char[] readerBuffer; flush() has no effect on input streams. Ali Thankf fot he quick reply. Unfortunately it behaves exactly as before with wchar.

Re: Strange behavior in console with UTF-8

2016-03-24 Thread Ali Çehreli via Digitalmars-d-learn
On 03/24/2016 05:54 PM, Jonathan Villa wrote: > I'm using WCHAR instead of CHAR > with the hope to get less problems in the future. Try char: char[] readerBuffer; > Also I tried stdin.flush() flush() has no effect on input streams. Ali

Strange behavior in console with UTF-8

2016-03-24 Thread Jonathan Villa via Digitalmars-d-learn
I prefer to post this thing here because it could that I'm doing something wrong. I'm using std.stdio -> readln() to read whatever I'm typing in the console. BUT, if the line contains some UTF-8 characters, the data obtained is EMPTY and module runnable; import std.stdio; import