Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[VarDumper] Display BOM characters #47519

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lyrixx opened this issue Sep 8, 2022 · 3 comments · Fixed by #48748
Closed

[VarDumper] Display BOM characters #47519

lyrixx opened this issue Sep 8, 2022 · 3 comments · Fixed by #48748

Comments

@lyrixx
Copy link
Member

lyrixx commented Sep 8, 2022

Hello,

We had a very strange issue, and it was a bit hard to debug (Mind the !==) :

image


TL;DR: there was a BOM (U+FEFF) character in front of the string.


I would be very cool to have the vardumper displaying such characters.
I made a reproducer if it can help:

https://gist.github.com/lyrixx/8fe4a205864855bd23f1c0ec44b6d72d

image


BTW, my IDE warns me about that:
image

@damienalexandre
Copy link
Contributor

All invisible Unicode characters could shown like that. There is already a image to display newline, we could have the same thing.

See this reference: https://invisible-characters.com/

@nicolas-grekas
Copy link
Member

That'd make sense to me, we should display them as we do for \n, as eg \u{feff}

@lyrixx
Copy link
Member Author

lyrixx commented Sep 8, 2022

I think it's a good idea, yes 💛

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

Successfully merging a pull request may close this issue.

4 participants