You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this library to read and write to shortcuts.vdf which Steam uses to store non-Steam game shortcuts. While testing, I found that encoded non-ASCII strings were using utf-16 which caused Steam to incorrectly parse the file.
I propose adding a new optional parameter to binary_dumps() (with utf-16 as a default) to allow encoding using utf-8. I have tested this in my fork of this library and Steam successfully parsed the resulting vdf file.
The text was updated successfully, but these errors were encountered:
Hi @rossengeorgiev, thank you for getting back to me so quickly. Decoding works correctly. The issue is when a string contains a non-ASCII character (for example, the ™ symbol) the value.encode('ascii') call will fail and then it will be encoded using utf-16 (which Steam parses incorrectly):
I am using this library to read and write to shortcuts.vdf which Steam uses to store non-Steam game shortcuts. While testing, I found that encoded non-ASCII strings were using utf-16 which caused Steam to incorrectly parse the file.
vdf/vdf/__init__.py
Line 368 in f2fd3da
I propose adding a new optional parameter to binary_dumps() (with utf-16 as a default) to allow encoding using utf-8. I have tested this in my fork of this library and Steam successfully parsed the resulting vdf file.
The text was updated successfully, but these errors were encountered: