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

Can you support UTF-8 encoding adaptation? #227

Open
wolffy1998 opened this issue Jan 4, 2025 · 6 comments
Open

Can you support UTF-8 encoding adaptation? #227

wolffy1998 opened this issue Jan 4, 2025 · 6 comments

Comments

@wolffy1998
Copy link

Can you support UTF-8 encoding adaptation?

@recompileorg
Copy link
Collaborator

What problem are you trying to solve? What isn't working for you now?

@wolffy1998
Copy link
Author

If the file path contains Chinese characters or the jar package name contains Chinese characters, the game cannot be started normally.

Most of the Java games I own now have Chinese names.

@recompileorg
Copy link
Collaborator

I don't think that is an issue with FreeJ2ME. Have you tried -Dfile.encoding=UTF8?

@wolffy1998
Copy link
Author

I am running it via retroarch cores

@recompileorg
Copy link
Collaborator

Java should respect your locale settings. Check the appropriate documentation for your operating system and Java version.

If you want to change what options the retroarch core passes to Java, you'll need to modify the following line and recompile: char *params[] = { "java", "-jar", outPath, resArg[0], resArg[1], rotateArg, phoneArg, fpsArg, soundArg, NULL };

@AShiningRay
Copy link
Contributor

Trying to solve this on the C side would be annoying, as it will pass bog-standard chars to the java side unless you rework it to use integers to support stuff outside ANSI (but then that would have its own issues since bit shifting would be needed, and some chars would only use 1, 2 or 3 of those bytes).

What i ended up doing in FreeJ2ME-Plus is convert it on the java-side and just leave the core as is: TASEmulators@913e2d5

FreeJ2ME-Plus is wildly different from this repo in quite a few ways, but the regions i touched in this commit are still very similar. I don't think a direct pick would cause much trouble.

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