How did having piercings in the right ear become associated with homosexuality?

I think you are correct. There is no such code.

Just ask if that’s a bandana in their pocket or they’re just happy to see you.