Bug Smash: Escape from New York. And unwanted characters

I tracked down the problem with importing Jotter notes today. Turns out that one of the early attempts I'd made to escape carriage return characters had created a Jotted note that told Davenport to create three new documents. Which it really didn't like doing when it's only supposed to have one open at a time - but it gave it its best shot.

Escaping characters, for those who haven't had to deal with this particular millstone of the digital age, is the dark art of making text-based communication between systems safe. If you've ever noticed weird stuff like %20 in the URL of a website you're visiting, you've seen character escaping in action. %20 is one way of representing the 'space' character without actually using it.

When communicating data, systems often rely on special codes that mean 'okay, that's the end of this chunk of data, get ready for the next'. If you don't escape characters correctly - which means replacing them with something safe - it's sometimes possible for users to type something that tricks the receiving system into interpreting the input wrongly. In this case it was the 'carriage return' character.

So now all is well again, and I can download and use the Jotted notes I created. Which means I've no excuse for not releasing a Jotter companion app alpha in the near future :)

Comments

Popular Posts