Skip to content

Fix AutoUpdate Issue with Non-Latin Usernames/Directories #1853

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

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

DanielSvoboda
Copy link
Contributor

@DanielSvoboda DanielSvoboda commented Dec 22, 2024

With this update, users who have usernames with Russian or other non-Latin characters can now use AutoUpdate without encountering the error shown in the image below.

  1. UTF-8 BOM Encoding for .ps1 File

    • The .ps1 file containing PowerShell commands is now saved with UTF-8 BOM encoding.
    • Added scriptFile.write("\xEF\xBB\xBF"); to ensure the correct encoding.
  2. Fix for Non-Latin Characters in Folder Paths

    • The change to use QStandardPaths::writableLocation ensures proper handling of non-Latin characters (e.g., Russian characters) in folder paths.
    • Previously, the old method failed to recognize and display these characters correctly.
  3. Temporary Folder Path Update

    • The temporary download location has been changed due to the use of this code, from::
      AppData/Local/Temp/temp_download_update
      
      to:
      AppData/Roaming/shadps4/Temp/temp_download_update
      

Error Screenshot

Testing

  • Print of the test I did with the code running in a folder in Russian (Администратор)
    Test Screenshot

  • It was also tested by a user on discord who presented the problem, and with his user it worked correctly.

@DanielSvoboda DanielSvoboda marked this pull request as draft December 22, 2024 19:11
@DanielSvoboda
Copy link
Contributor Author

I put it as 'draft', as it is not working correctly yet

@DanielSvoboda DanielSvoboda marked this pull request as ready for review December 22, 2024 20:58
@DanielSvoboda
Copy link
Contributor Author

Now it works correctly, it has been tested.

@DanielSvoboda DanielSvoboda changed the title Fix updater for non-Latin user directories Fix AutoUpdate Issue with Non-Latin Usernames/Directories Dec 23, 2024
@georgemoralis georgemoralis merged commit dfdd819 into shadps4-emu:main Dec 23, 2024
10 checks passed
Xcedf pushed a commit to Xcedf/shadPS4 that referenced this pull request Dec 29, 2024
…u#1853)

* Fix updater for non-Latin user directories

* QStandardPaths
Xcedf pushed a commit to Xcedf/shadPS4 that referenced this pull request Dec 29, 2024
…u#1853)

* Fix updater for non-Latin user directories

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

Successfully merging this pull request may close these issues.

2 participants