I have a Pokémon Emerald save that after using PKSM on it some data got corrupted somehow: it took a long time to load, and when it did the trainer name had been replaced with gibberish. So i opened it on PKHeX hoping to fix it, and when I try to edit the name I can write on the name field, but after clicking "Save" and opening the "Trainer Info" tab again, the name will always appear blank and won't update to whatever I write on it. I've tried running the save file and it seems to work fine, but the trainer name is blank. My old Pokémon correctly state my previous name as their OT's, but they behave like traded Pokémon since my current trainer name doesn't line up. New Pokémon will list a blank space on their OT field. The save file is in the format .gbavc.sav and it only appears to happen with this save, I tried editing a Pokémon Yellow trainer's name and it worked correctly.
Does anyone have any idea how to fix it?