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

Closed
opened 2026-02-27 21:08:14 +03:00 by kerem · 6 comments
Owner

Originally created by @Exo61 on GitHub (Feb 8, 2025).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2378

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

Originally created by @Exo61 on GitHub (Feb 8, 2025). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2378 ### Checklist - [x] I have searched for a similar issue in this repository and did not find one. - [x] I am using an official build obtained from [releases](https://github.com/shadps4-emu/shadPS4/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
kerem 2026-02-27 21:08:14 +03:00
Author
Owner

@KnifeOnlyI commented on GitHub (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

<!-- gh-comment-id:2646617842 --> @KnifeOnlyI commented on GitHub (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](https://github.com/user-attachments/assets/0f19a64c-0656-49f9-8520-936c2299840b) ![Image](https://github.com/user-attachments/assets/71a76f43-4526-433d-90a4-a47e26ea91d1) The string in `config.toml` file : ![Image](https://github.com/user-attachments/assets/0040dbf4-2838-4344-adc9-adbc67388363) 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](https://github.com/user-attachments/assets/13d415fa-e226-4928-8aaf-34266b593c3f)
Author
Owner

@AfonsoMendoncaJacinto commented on GitHub (Feb 25, 2025):

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

<!-- gh-comment-id:2682958400 --> @AfonsoMendoncaJacinto commented on GitHub (Feb 25, 2025): If I understand this correctly, the solution would be to issue a warning in the frontend, if the desired path has accents?
Author
Owner

@KnifeOnlyI commented on GitHub (Feb 25, 2025):

@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.

<!-- gh-comment-id:2682967838 --> @KnifeOnlyI commented on GitHub (Feb 25, 2025): @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.
Author
Owner

@DoubleSpicy commented on GitHub (Feb 27, 2025):

Is it caused by incorrect encoding? characters like é are not supported by ASCII, so probably std::wstring is needed to support UTF-8.

<!-- gh-comment-id:2688667592 --> @DoubleSpicy commented on GitHub (Feb 27, 2025): Is it caused by incorrect encoding? characters like é are not supported by ASCII, so probably std::wstring is needed to support UTF-8.
Author
Owner

@JoooPT commented on GitHub (Mar 7, 2025):

Can I get assigned to this? I would like to work on it.

<!-- gh-comment-id:2705406211 --> @JoooPT commented on GitHub (Mar 7, 2025): Can I get assigned to this? I would like to work on it.
Author
Owner

@Hermiten commented on GitHub (Mar 29, 2025):

Fixed with #2699

Image
<!-- gh-comment-id:2763245413 --> @Hermiten commented on GitHub (Mar 29, 2025): Fixed with #2699 <img width="165" alt="Image" src="https://github.com/user-attachments/assets/fda50f0d-efc1-4032-b0e2-e6e6542e3845" />
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#804
No description provided.