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

Please update to convert to utf8 string output. #2

Open
mrdude2478 opened this issue Apr 8, 2022 · 5 comments
Open

Please update to convert to utf8 string output. #2

mrdude2478 opened this issue Apr 8, 2022 · 5 comments

Comments

@mrdude2478
Copy link

mrdude2478 commented Apr 8, 2022

Please update your code to show proper utf8 encoded strings, for example:

BATMAN™: ARKHAM KNIGHT

This shows as - BATMANâ„¢: ARKHAM KNIGHT

Bytes that show â„¢ have not been converted to utf8 stings so do not show up as ™, there's many other games that have these type of characters where the bytes read and printed are not being decoded to the utf8 format.

Thanks.

Maybe this can help:
https://dev.to/rdentato/utf-8-strings-in-c-2-3-3kp1

@hippie68
Copy link
Owner

hippie68 commented Apr 8, 2022

Thanks, I will have a look.

Currently, the characters are printed as they are, requiring an UTF-8 environment.
On Unix systems, this should be the default.

If you are using Windows 10+, for the time being you could enable the UTF-8 beta feature: Settings - Time & Language - Language - Administrative language settings - Change system locale... - Beta: Use Unicode UTF-8 for worldwide language support
The characters will then display properly.

@mrdude2478
Copy link
Author

Thanks for the quick reply, I will try that later. Thanks again - for this program. I made a basic gui for it with visual studio c# for quickly renaming my games/dlc etc. This program made that much easier so thanks for the effort you have put into this.

@mrdude2478
Copy link
Author

mrdude2478 commented Apr 10, 2022

@hippie68

I made a few mods to your source code so it's C++ compatible, that way you can compile with gcc and g++, also as I am using
on windows I changed some stuff in the debug settings to show me some extra hex info.

Here's the mods:
sfo.zip

(use c++ 11 if compiling on windows: g++ sfo.cpp -O3 -std=c++11 -s -o sfo.exe)

@thezodiacox0
Copy link

thezodiacox0 commented Jul 12, 2024

It is displayed like this when I run the command, how can I make it look like this ★Test★ instead of ?Test? ?

On windows i see the stars but the param.sfo not show me

@hippie68
Copy link
Owner

If activating the UTF-8 beta feature (see above) isn't helping enough, the new Windows Terminal, which is the default terminal in Windows 11 and also available as a separate download for Windows 10, should properly support all UTF-8 characters.

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

No branches or pull requests

3 participants