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

Already on GitHub? Sign in to your account

failed to form statements: invalid character 'ï' looking for beginning of value #121

Open
blabut opened this issue Mar 25, 2024 · 3 comments

Comments

@blabut
Copy link

blabut commented Mar 25, 2024

With a freshly installed version of gron from Howebrew, I am getting the following error when trying to gron a json from a BloodHound output:

$ cat 20240325120043_users.json | gron
failed to form statements: invalid character 'ï' looking for beginning of value

I checked manually and the input json file does not contain the incriminated ï character. Is there any known cause / workaround to this issue ?

I am under MacOS Ventura 13.6.

Thanks a lot!

@RossPatterson
Copy link

You're almost certainly processing a UTF-8 document, but not processing it as UTF-8. See https://en.wikipedia.org/wiki/%C3%8F#Computing for an explanation of the mistake.

@blabut
Copy link
Author

blabut commented Mar 25, 2024

I understand it must indeed be related to encoding, but it does not make sense to me that I get this error while processing json output from a standard tool.

@kbilleter
Copy link

Stupid BoMs. Try something like

sed $'1s/^\uFEFF//' 20240325120043_users.json | gron

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

3 participants