Weird Trainer Naming Issue in Gym

Today I looked at mons in a gym and noticed one was named with the letter "t" followed by 13 numbers that seemed random. When I entered battle, the name changed to letters, and the new name was derogatory towards another player. How are people doing this?
EDIT: Changed redaction to only the other player's name. enter image description here


It is likely that this player's name was detected as offensive and was removed and the t+digits is a temporary or permanent replacement name. The gym may use a different database table to store the relevant information and may have kept the player's old name before it was banned.


I think his username was too long so that you couldn't see the offensive part until you entered the battle...

For example, he could put h4848486468446864yourdadisreallybad, but you'd only see the end of it.