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

[APP BUG]: "Directory to Install Game Path doesn't handle characters with accents #2378

Open
2 tasks done
Exo61 opened this issue Feb 8, 2025 · 3 comments
Open
2 tasks done
Labels

Comments

@Exo61
Copy link

Exo61 commented Feb 8, 2025

Checklist

  • I have searched for a similar issue in this repository and did not find one.
  • I am using an official build obtained from releases or updated one of those builds using its in-app updater.

Describe the Bug

When installing ShadPS4 into a directory or path with a character containing an accent (like "É"), the path has to be re-added every time ShadPS4 is being launched.

The main reason is that it replaces the character with an accent by multiple symbols, corrupting the path and therefore not listing games anymore.

Here is a screenshot: https://ibb.co/27x4Stw4

Can you fix this issue?

Thank you

Reproduction Steps

  1. Add a Directory to Install Game Path containing a symbol with an accent, like "É"
  2. Close ShadPS4
  3. Re-open ShadPS4
  4. Check the the Directory to Install Game Path again and see the symbols
  5. Games are not listed anymore until re-adding the path with the right character again

Expected Behavior

Directory to Install Game Path remains the same everytime ShadPS4 is open, no matter the name of the folders

Specify OS Version

Windows 11

@Exo61 Exo61 changed the title [APP BUG]: "Directory to Install Game Path doesn't handle character with accents [APP BUG]: "Directory to Install Game Path doesn't handle characters with accents Feb 8, 2025
@KnifeOnlyI
Copy link

KnifeOnlyI commented Feb 9, 2025

Hello,

I am currently investigating the cause of the problem and can already conclude that it is not due to the saving of the path in the configuration file. In the config.toml file, the path is correctly stored with the accents. Therefore, it is probably the in-memory loading of the string that is causing the issue.

After reopen ShadPS4 :

Image

Image

The string in config.toml file :

Image

If I use a debugger, this is what I get: the string loaded in memory doesn't handle the accents. It would be interesting to see if it's the same on Linux. (src/common/config.cpp)

Image

@Hermiten Hermiten added bug Something isn't working frontend contributor wanted labels Feb 24, 2025
@AfonsoMendoncaJacinto
Copy link

If I understand this correctly, the solution would be to issue a warning in the frontend, if the desired path has accents?

@KnifeOnlyI
Copy link

@AfonsoMendoncaJacinto Probably not. The toml file contains correct strings (with accents), we just need to read it correctly. Currently I think the problem come from the reading file operation, not writing.

I don't know the TOML library used by ShadPS4, I don't know if the problem come from this library or ShadPS4 code. I can't find any information about how TOML library read file and handle UTF-8.

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

No branches or pull requests

4 participants