OpenTTD / eints

WebTranslator for OpenTTD and its add-ons
GNU General Public License v2.0
5 stars 11 forks source link

eints allows submitting strings with disallowed UTF8 characters #43

Open LordAro opened 3 years ago

LordAro commented 3 years ago

Specifically, U+200B (zero-width space)

Results in build failure:

  /home/runner/work/OpenTTD/OpenTTD/src/lang/japanese.txt:2405: FATAL: Unwanted UTF-8 character U+200B in sequence '{BLACK}道路の種類を変更/アップグレードします.Shiftは、コスト見積もりの​​作成/表示を切り替えます'

see https://github.com/OpenTTD/OpenTTD/commit/b721787c7fafbff040fbcaa188a9d5dd7557e26f

& associated block in strgen

https://github.com/OpenTTD/OpenTTD/blob/224625942c44ec33519010ae320b3821d933229a/src/strgen/strgen_base.cpp#L735-L740

LordAro commented 3 years ago

And https://github.com/OpenTTD/OpenTTD/issues/5589 for why U+200B specifically is disallowed