Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

to-json/pretty: "\uD83C\uDDE9\uD83C\uDDEA" is not pretty #56

Open
dolmen opened this issue May 14, 2019 · 2 comments
Open

to-json/pretty: "\uD83C\uDDE9\uD83C\uDDEA" is not pretty #56

dolmen opened this issue May 14, 2019 · 2 comments

Comments

@dolmen
Copy link

dolmen commented May 14, 2019

Pretty output is for humans. "\uD83C\uDDE9\uD83C\uDDEA" is not pretty.

What happens:

$ perl6 -MJSON::Fast -e 'say to-json "馃嚛馃嚜", :pretty'
"\uD83C\uDDE9\uD83C\uDDEA"

Expected output:

"馃嚛馃嚜"
@dolmen dolmen changed the title to-json/pretty: "" is not pretty to-json/pretty: "\uD83C\uDDE9\uD83C\uDDEA" is not pretty May 14, 2019
@timo
Copy link
Owner

timo commented May 14, 2019

i disagree. :pretty json output should still be valid json, as terrible as that is.

@timo
Copy link
Owner

timo commented May 14, 2019

welp, re-reading the multitude of json rfcs i don't understand where i got the impression that anything outside of the basic multilingual plane has to be turned into utf16 surrogate pairs that are then escaped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants