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

Support UTF-8 Characters in get_from_vdf_file #19

Open
pallen0304 opened this issue Dec 3, 2024 · 2 comments
Open

Support UTF-8 Characters in get_from_vdf_file #19

pallen0304 opened this issue Dec 3, 2024 · 2 comments
Assignees
Labels
bug Something isn't working tracking Indicate current subject of focus or partial focus on task/issue

Comments

@pallen0304
Copy link

pallen0304 commented Dec 3, 2024

Background:

Patcher gets stuck when attempting to patch executable. This is caused by some games having UTF-8 characters (e.g. Japanese characters) in the appmanifest .acf files 'name' property. I discovered this as the cause after running the patcher with debug enabled.

Example:

Log hangs with final statement:
"[DEBUG] From appmanifest_174531.acf getting values of appid" is the last item logged, which correlates to a file with:
Name property of appmanifest_174531.acf:
"name" "與經紀人戀愛是絕對禁止!"

Related Code:

I'm not certain of how to fix this in Python, but the logs narrow it down to be within this code in steam_helper.py.

<Perma-link to code in v1.1.0-pre tagged commit>

vdf_fh = vdf.load(open(vdf_file))
values_out = self.recursive_dict_find_value(vdf_fh, key, stop_on_find)

Workaround

I was able to work around this issue by editing all the .acf files containing UTF8 characters and changing the name property value to use ASCII characters only

@r0fld4nc3 r0fld4nc3 self-assigned this Dec 3, 2024
@r0fld4nc3 r0fld4nc3 added the bug Something isn't working label Dec 3, 2024
@r0fld4nc3
Copy link
Owner

Hey @pallen0304

Thank you so much for the wonderfully detailed report!

I'll look into this, need to do some tests then on it, but good that you found it.

@JoenvandeVorle
Copy link

I was about to post an issue on my patcher getting stuck as well, but I think this might be the issue as I have games with Chinese characters in their title. Glad you are looking into it

@r0fld4nc3 r0fld4nc3 added the tracking Indicate current subject of focus or partial focus on task/issue label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracking Indicate current subject of focus or partial focus on task/issue
Projects
None yet
Development

No branches or pull requests

3 participants