From what I got, everyone kinda suspected it (because of the actor, and, well, there was certainly something wrong with Palpatine - his pedosmile at Coruscant, him orgasming at getting elected etc.), but people thought that maybe it would turn out somehow... different. It didn't.
I think that's called an "untwist".
McDiarmid himself, on the bonus DVD, says so himself: "You'd indeed be a very strange person if you didn't know that." Adding that technically, he was forbidden to admit to that in public... lol.
That reminds me of something. Although I doubt it would interest anyone here, I've followed "The Matrix Online" when it was around (that multiplayer game they made as a "continuation" to the Matrix films), and, freak of the week plots aside, it started out with a myth arc about a mysterious "General" who kept perpetrating false flag attacks on the various factions to apparently saw distrust; later, he appeared in person with a bunch of soldier mooks offering his helps to the different factions and again, apparently "secretly" pushing for a war.
The execution was HYSTERICAL (just as the whole story was basically kinda cheap fanfic) - everyone had figured out he was the guy between the initial false flag attacks the moment he appeared on screen, yet the story "officially" defnied it. After a while, everyone started suspecting he and his mooks were Machine sentinels pissed at having to stop the war in the movie, thus trying to restart a war. It went on for a while, and then the big reveal came... guess what it was :D
If you want an example of how writers try to retcon their mystery into something else after the audience has figured it out, look no further than Lost :DD