-
Notifications
You must be signed in to change notification settings - Fork 32
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
Failure parsing binary VDF fields with invalid UTF-8 strings #20
Labels
Comments
Yeah, PICS has these issue with malformed data. Valve doesn't seem to validate it properly on their end, and even truncate utf-8 in the middle of glyphs. The best approach would be to use replace on errors as there is not much a dev can do handle this. |
rossengeorgiev
added a commit
that referenced
this issue
Jul 24, 2019
1 task
rossengeorgiev
added a commit
that referenced
this issue
Jul 26, 2019
rossengeorgiev
added a commit
that referenced
this issue
Jul 26, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vdf fails to parse binary VDF files which contain fields with invalid UTF-8. One such invalid field was discovered in an entry for Spore inside appinfo.vdf. The exception that occurs is:
I've uploaded a snippet that can be used to reproduce this error here:
https://gist.github.com/Matoking/e2dfe281386ff4eac9022eb0f02d80cd
SteamDB seems to replace the invalid character with a question mark:
https://steamdb.info/app/24720/history/ (the faulty string here is Moje Spore v�tvory)
A similar fix in vdf would mean replacing the
result.decode('utf-8')
call withresult.decode('utf-8', errors='replace')
or letting the developer decide how to handle errors by passing an optionalerrors
kwarg.The text was updated successfully, but these errors were encountered: