Strange behavior in console with UTF-8
Steven Schveighoffer via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Mar 28 11:28:33 PDT 2016
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: á, é, í, ó, ú, ñ, à, è, ì, ò, ù.
> Just one input is enough to reproduce the behaviour.
>
> JV
>>>
>>> It's the same Ali suggested (if I get it right) and the behaviour its
>>> the same.
>>>
>>> It just get to send a UTF8 char to reproduce the mess, independently of
>>> the char type you send.
>>>
>>
>> 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 your post.
>>
>
> The following chars I've tested: á, é, í, ó, ú, ñ, à, è, ì, ò, ù.
> Just one input of thouse is enough to reproduce the behaviour
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 get a length of 0).
On 32-bit, the program exits immediately, indicating it cannot read any
more data.
On 64-bit, the program continues to allow input.
I don't think this is normal behavior, and should be filed as a bug. I'm
not a Windows developer normally, but I would guess this is an issue
with the Windows flavors of readln.
Please file here: https://issues.dlang.org under the Phobos component.
-Steve
More information about the Digitalmars-d-learn
mailing list