#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,653
    Rep Power
    171

    SMS is ASCII not HTML, use line break characters.


    Hello;

    What does it mean?
    SMS is ASCII not HTML, use line break characters.
    Does it mean line break in \n ?

    Why can't I find line break here Thanks
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    There is no line break character. There's a carriage return (CR aka "\r") and a line feed (LF aka "\n"). Different systems combine those in different ways to represent a line break. Usually it's either a single LF or a CR LF.

    I have no idea which one is used for SMS or if there's even a common standard.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,653
    Rep Power
    171
    Originally Posted by Jacques1
    There is no line break character. There's a carriage return (CR aka "\r") and a line feed (LF aka "\n"). Different systems combine those in different ways to represent a line break. Usually it's either a single LF or a CR LF.

    I have no idea which one is used for SMS or if there's even a common standard.
    Jacques1;
    Where did you learn EVERYTHING? I am not joking. Where and how did learn programming? You're like Jesus.
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2003
    Posts
    804
    Rep Power
    101
    The standard character set for SMS messages from GSM phones is GSM 03.38. It contains CR and LF characters, so whatever library you are using to send SMS messages should properly convert CR and LF to their equivalents. Whether you should use CR, LF, or CR-LF is going to depend on the device that's used to view the SMS (and some mobile devices may not even respect the CR or LF characters, replacing them with spaces instead).

    In any case, the point of the quote you posted was that you shouldn't use HTML code such as <p> or <br> or <br/> in SMS messages. It won't render, it'll just appear in the SMS message as text.

IMN logo majestic logo threadwatch logo seochat tools logo