-
Notifications
You must be signed in to change notification settings - Fork 42
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
TokenTool won't run if install path has accented characters #60
Comments
Tested the latest TT on MacOS Mojave (10.14.6) with multiple different accented characters and there's no failure; the splash screen appears and the applications works as expected. I used the directory name
which contains a variety of characters and symbols. Dragging an image from that folder into TT worked, as did the File > Save As option to store the image back into that directory. It sounds like there may be something in the Windows implementation. Note that Windows doesn't have a system-wide encoding setting, while Unix applications typically use the value of environment variable |
I just verified that it's a problem on windows (10). |
A bit of unstructured playing around later I don't think it even gets into the TokenTool java code. |
That’s some good detective work. 👍 Java has had similar bugs in the past. It wouldn’t surprise me if this is another one. It may even be logged already. For now, we can document it while investigating. And maybe the installer can put up a message in big letters about this issue! |
Perhaps this bug? https://bugs.openjdk.java.net/browse/JDK-8195129 |
Yeah, that one sounds likely, not as if we can avoid having System.load() getting called. :) Somewhat to my surprise, pcgen (which uses launch4j to make installers) doesn't have a problem with starting from folders containing diacritics. Might be worth looking into launch4j (for tokentool and maptool both I guess), unless this has been rejected already? (Pcgen is on jdk 11 and uses a mix of swing and javafx, so reasonably similar tech stacks.) |
Hm. Not that bug, then; System.load() is unavoidable in any JVM, so if PCGen runs, this is not the bug we're looking for. More likely it has to do with a JVM option, such as encoding not being set properly... Can you try this solution and see if it helps? You can put the env var into your settings and launch TT or MT from the GUI (changes to env vars won't affect command line windows that were already open). https://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding#362006 |
No, that didn't work. I tried setting both JAVA_TOOL_OPTIONS and JAVA_OPTIONS to -Dfile.encoding=UTF8, but got the same behaviour. |
Both TokenTool and MapTool have executables that read a config file from the app dir. In it is this line:
I wonder if it is the expansion of |
This is fixed in 2.2.0. |
Describe the bug
TokenTool won't run after installing to a directory with accented characters in the name.
Known to be an issue are these from the Polish language: ą ę ś ż ź ó ł ń ć
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expect it to handle any valid Windows path.
TokenTool Info
Desktop (please complete the following information):
Additional context
Reported by wyelky-jaahr on Discord.
The text was updated successfully, but these errors were encountered: