Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upHave toString show escape code for \u{0001} #930
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
process-bot
Dec 24, 2017
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Dec 24, 2017
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
rhofour
referenced this issue
Dec 24, 2017
Open
Distinguishing between identical-looking characters in test output #225
evancz
added
the
request
label
Mar 7, 2018
evancz
changed the title from
toString handles unprintable characters poorly
to
Have toString show escape code for \u{0001}
Mar 7, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rhofour commentedDec 24, 2017
•
edited
Edited 2 times
-
rhofour
edited Dec 24, 2017 (most recent)
-
rhofour
edited Dec 24, 2017
Consider the following string
x = "a\0b\1c"If typed on the repl it will display like this:
It looks like we lost the \1 character, but actually it's being printed directly (and not showing up since it's an unprintable character). This can be verified as follows:
String.toList (toString x)This doesn't seem like a great way to handle this. I don't know what the best way to handle this is, but doing something simple like also escaping non-null unprintable characters seems like it'd be an improvement.
This is all on 0.18.0.
One suggestion for how to handle this better is at elm-community/elm-test#225 .