Tech Blog

HOWTO insert a line break in SMS

Posted At : November 26, 2007 4:01 PM 1 Comments

I've spent some time today setting up a ColdFusion scheduled task which is sending out text messages (SMS) via Clickatell HTTP API. SMS contains some reporting data and the problem I encountered was how to display each reporting figure on a new line. I knew I couldn't use br or \n for obvious reasons, so there had to be another magic character that did the trick. That magic character is %0A

For example, if I wanted to display the following text in SMS:

Line 1
Line 2

I would have to write my code like so:

Line 1%0ALine 2

Nice!

Marko

1 Comments

mobiyard 5/16/08 10:14 AM

wow, that was great post.. thanx for sharing the same...
<a href="http://www.mobiyard.com">Mobile Social networking</a>