-
Notifications
You must be signed in to change notification settings - Fork 134
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
Physical Attack Table Encoding Error (Push attack) #1111
Comments
This is happening because it's trying to print an em dash that was just dropped into the code as a UTF-8 literal, which Java doesn't support:
It's being interpreted as 3 distinct bytes (0xE2, 0x80, 0x94) and translated with presumably the default system encoding, I see something slightly different on my sheet. The fix will almost certainly involve using a Java Unicode literal, like this:
There may be other necessary steps after that, like ensuring the output encoding when printing has that character. Given that we both see something slightly different here, I don't think that's the case. UTF-8 would probably be the best option. |
Actually, looks like that was all it needed. Just tested it, and that worked. I'll submit a PR. I realized the only reason mine looked slightly different than yours @jskelcher was that I was using a custom font. |
Environment
Both MekLab 0.48.0 & 0.49.8
MekHQ bundle
Windows 11
Java vendor Eclipse Adoptium 11.0.13
Description
When exporting to PDF: A Mech with tables, the Damage entry for the Push Attack in the Physical Attacks table is displayed as — rather than 0. This occurs in both Acrobat and in Chrome's PDF renderers. Tested with Eurostile and Arial font families.
Same issues occurs when printing a Mech directly from MegaMekLab itself.
megameklablog.txt
The text was updated successfully, but these errors were encountered: