huderlem / porymap

Map editor for pokeemerald, pokefirered, and pokeruby
https://huderlem.github.io/porymap/
GNU Lesser General Public License v3.0
465 stars 93 forks source link

Special characters in MAPSEC names break the region_map_entries.h file and unables to build the project #557

Closed ExcmoJack closed 11 months ago

ExcmoJack commented 11 months ago

I noticed that when a MAPSEC name has an special character in Region Map Editor it is written in region_map_sections.json, and then converted into code in region_map_entries.h.

The issue is that when typing Pokémon in the JSON it becomes Pok__mon in the .h, converting that é character into __for some reason. However, when typing another special character like á it becomes a , impeding to build the project due to syntax errors:

Region Map Editor: imagen

region_map_sections.json: imagen

region_map_entries.h: imagen

I know not anybody makes a game in Spanish (or whatever language which uses special characters as tildes or etc), but there is a solution already implemented for this issue, but just for the é character in Pokémon. What I propose is to extend this behavior to all special characters, replacing them with __ as for now or replacing them for the same character without the tilde.

GriffinRichards commented 11 months ago

It looks like Porymap correctly output your name in the JSON file. This would be an issue with jsonproc in pokeemerald (or whichever repo you're using), i.e the tool responsible for converting that JSON data to C

ExcmoJack commented 11 months ago

Oh, I got it, I thought it was part of porymap. Thanks!

GriffinRichards commented 11 months ago

Thanks for the report regardless! I opened an issue in pokeemerald to track this problem