Unciv icon indicating copy to clipboard operation
Unciv copied to clipboard

Feature request: Remove non-ascii symbols

Open SeventhM opened this issue 2 years ago • 5 comments

Various symbols such as "≈", "½", or "⅓" tend to break when used in non Utf-8 text editors. While it is somewhat rare to find editors not using Utf-8 (I was using Shift-JIS for unrelated reasons and forgot to switch back), the 1/10 symbol for railroads breaks within githib's own editor, so it feels worthwhile to remove these symbols.

Minimum, I'd hope "≈" gets removed in the military city state unique in favor of "roughly"

SeventhM avatar Mar 16 '23 21:03 SeventhM

Android Studio itself, too - but I'd not mutilate text, I'd try to ensure compliant editors... Since we can't force everybody away from - ahem, to use external editors, how about saving i18n files with the UTF-8 BOM? Maybe that would help the unpolite environments to recognize the standard encoding...

SomeTroglodyte avatar Mar 17 '23 15:03 SomeTroglodyte

Tests:

  • Saving template.properties with a BOM will not break anything as far as I can see
  • TranslationFileWriter will propagate the BOM
  • Translations with a BOM will still work fine
  • Commits and Pushes will recognize this as an encoding-only change
  • Such files will edit fine in github's editor, the 1/10th symbol is there
  • Android Studio ignores the BOM and seems to incorrectly edit our translation files because it has a separate default encoding setting for .properties files and that comes set to ISO-8859-1. Change to UTF-8 and bingo.

As for the "≈" --- there was a whole discussion back then and this was the result. To change, one would start in UniqueType.kt line 128, then our jsons, then all existing mods,...

SomeTroglodyte avatar Mar 21 '23 20:03 SomeTroglodyte

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Mar 14 '24 21:03 github-actions[bot]

To change, one would start in UniqueType.kt line 128, then our jsons, then all existing mods

Easily avoidable with our typical deprecation process. Not sure the issue there. If nothing else, same with the 1/10th symbol given that's an issue with just civilopediaText, not even any code. Rekmod shows an obvious alternative that doesn't rely on such symbols. Like, minimum, my request is just that for, minimum, english facing stuff where ascii isn't a problem. I might just PR this myself if necessary

SeventhM avatar Mar 19 '24 23:03 SeventhM

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Jun 18 '24 03:06 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Jul 04 '24 03:07 github-actions[bot]