pret / pokeemerald

Decompilation of Pokémon Emerald
2.28k stars 2.55k forks source link

[jsonproc] Workaround to handle basic special characters #1965

Closed ExcmoJack closed 9 months ago

ExcmoJack commented 11 months ago

Description

This is a workaround to avoid compilation fails when including special characters in map names #1963 . pokeemerald/tools/jsonproc was modified to include some special characters in the list of "bad characters" and implemented some commands to replace them with the better ascii aproximation:

aChars = "áàâä";
AChars = "ÁÀÂÄ";
eChars = "éèêë";
EChars = "ÉÈÊË";
iChars = "íìîï";
IChars = "ÍÌÎÏ";
oChars = "óòôöœ";
OChars = "ÓÒÔÖŒ";
uChars = "úùûü";
UChars = "ÚÙÛÜ";
nChars = "ñ";
NChars = "Ñ";

This makes that it won't break anymore, although it doesn't grants the correct result yet. It changes Villa Raíz for Villa Ra_iz i.e. however, I run out of ideas. My guess is that the first try to replace a bad character also inserts the character even not having to replace it, but I don't know how to fix it.

Discord contact info

Discord: excmojack

GriffinRichards commented 9 months ago

Handled for now by #1975