This one had me pulling my hair out. I couldn't figure out why my encoded string didn't match what my server expected - until I read that this function inserts newlines into the encoded string every 76 chars and this is the default action i.e. insertNewLines = true. Surely the default for this should be false!
Keeping the Flex Language Reference open while developing can save you a lot of aggrivation and wasted time. If you are unfamilar with a class or something behaves in an unexpected manner, just look it up and often times you can figure it out just from the documentation. In a case such as this, you would quickly see what the default property values are.
That's sound advice, but it's not an excuse for bizarre default behavior (of which Flex--and Flash especially--has a fair share).