A nice little BES / BIS “gotcha”

A nice little BES / BIS “gotcha”

A funny thing happened while testing today.

Well. It really wasn’t that funny.

Just strange.

I was testing a new Blackberry app to run solely over BIS and / or solely over BES.

And all hell started breaking loose.

JSON wouldn’t parse. Calls broke. Dogs and cats lied down next to each other.

After a little digging, I discovered that when an app makes calls over BIS or BES, there’s a good chance the data you get back will be a mixed stream of UTF-16 and UTF-8 data.

Not just a good chance. In my case, it ALWAYS returned mixed data.

Talk about your basic cluster smuck.

The fix turned out to be simple enough. I just had to set x-rim-transcode-content in my HTTP headers to none and voila! Problem solved. Nothing but good ol’ pure UTF-8.

I can’t imagine how many people out there are having this problem.  But I hope this little “heads up” can save someone a little grief.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s