I've noticed that when I export a Pokémon as a .pkm file from a 4th gen save file using Pokégen, then uploading it to Pokécheck in 4th gen format the legality analysis tells me I have invalid OT trash bytes. So I've looked into it and I've found the issue. It seems that Pokégen is dropping the terminator for some reason. I've attached two .pkm files (the one extracted by Pokégen, and the one uploaded to Pokécheck via GTS) and posted a picture at the end of this post so you can see the problem.
For the two .pkms the OTs are (closed Pokégen, then reopened it, and loaded only the .pkm file for these):
Extracted from Pokégen: \012B\0147\0149\FFFF\013C\0139\0141\0000
From Pokécheck: \012B\0147\0149\FFFF\013C\0139\0141\FFFF
I'm not sure if this problem extends to Pokémon with names longer than 7 characters or not but I suppose it would be worth looking into.
Edit: Name that is as long as the OT + 1 character is fine. This one http://www.pokecheck.org/?p=detail&uid=1006316 is exactly the same when extracted by Pokégen. I'm not sure about names longer than that, aside from the 7 character name SPEAROW.