I agree with EmpTyger, except for the "althought not completely sure" part.
The simple fact that anyone, regardless of role or motive, could encode any message they want, is sufficient enough to allow it as a viable strategy. As mafia, I could encode ten different posts, one with each potentital role claim, and all in different codes. When the time came for me to choose a role, I could just reveal that post and explain the code I used. Does this give me an advantage as scum? No, because a responsible townie can point out that my exact plan was a possibility.
As to EmpTyger's concern: Even given the above scenario, this doesn't imply that it's a townie's responsibility to search every post for codes. In fact, a clever enough coder could make it essentially impossible for the code to be discovered, meaning that even a brilliant code-detecting townie would be wasting his/her time searching for the code. What
is
the townie's responsibility is to not be foolishly blindsided by someone's claim that since they encoded their role early on, that this proves that they are who they claim to be.
In contrast, invisiposting should be prohibited from a practical viewpoint. It is very easy to detect, by highlighting, and is thus a tedious waste of everyone's time to check for it. Further, smart players wouldn't use if it were legal, since they know it could be discovered by anyone, and so we'd theoretically end up with the scenario that although no one would use the invisible text, all good players would be forced into constantly checking for it.
Cam