You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to see the line line = line.encode("unicode_escape").decode("ascii") removed ideally,
but @hexDoor has pointed out that this may be necessary to escape things away such as ANSI colour codes.
Unfortunately it escapes normal characters that are of multi-byte width (eg. other language codepoints, emojis, etc.)
Can we make it less restrictive, i.e. normally render displayable characters, and just escape dangerous/non-displayable bytes away?
The text was updated successfully, but these errors were encountered:
Test 3 (./mini_grep '😂') - failed (Incorrect output)
Your program produced this line of output:
oh and; emojis should work too \U0001f602\U0001f602\U0001f602
The correct 1 lines of output for this test were:
oh and; emojis should work too \U0001f602\U0001f602\U0001f603
The difference between your output(-) and the correct output(+) is:
- oh and; emojis should work too 😂😂😂
? ^
+ oh and; emojis should work too 😂😂😃
? ^
The input for this test was:
oh and; emojis should work too 😂😂😂
and they follow the same rules: 😃 🌍 🍞 🚗
You can reproduce this test by executing these commands:
rustc mini_grep.rs
echo -e 'oh and; emojis should work too 😂😂😂\nand they follow the same rules: 😃 🌍 🍞 🚗' | ./mini_grep 😂
With that line of code removed:
Test 3 (./mini_grep '😂') - failed (Incorrect output)
Your program produced this line of output:
oh and; emojis should work too 😂😂😂
The correct 1 lines of output for this test were:
oh and; emojis should work too 😂😂😃
The difference between your output(-) and the correct output(+) is:
- oh and; emojis should work too 😂😂😂
? ^
+ oh and; emojis should work too 😂😂😃
? ^
The input for this test was:
oh and; emojis should work too 😂😂😂
and they follow the same rules: 😃 🌍 🍞 🚗
You can reproduce this test by executing these commands:
rustc mini_grep.rs
echo -e 'oh and; emojis should work too 😂😂😂\nand they follow the same rules: 😃 🌍 🍞 🚗' | ./mini_grep 😂
https://github.com/COMP1511UNSW/autotest/blob/main/explain_output_differences.py#L379
I would like to see the line
line = line.encode("unicode_escape").decode("ascii")
removed ideally,but @hexDoor has pointed out that this may be necessary to escape things away such as ANSI colour codes.
Unfortunately it escapes normal characters that are of multi-byte width (eg. other language codepoints, emojis, etc.)
Can we make it less restrictive, i.e. normally render displayable characters, and just escape dangerous/non-displayable bytes away?
The text was updated successfully, but these errors were encountered: