Rami Alshareef
Rami Alshareef

Reputation: 7140

include a 'new line' in sms text using GSMCommunication Library

I'm using the GsmCommMain class to send an sms
I want to include a new line in my sms, i tried the normal default Environment.NewLine and the chart set \0x0A but nothing realy had helped..

any suggestions?

Edit:
Environment.NewLine did the job

turns out that the system has this block of code

body = body.Replace("\t", " ").Replace("\n", " ").Replace("\r", " ");

Thank you, issue is solved

Upvotes: 0

Views: 5512

Answers (3)

Rami Alshareef
Rami Alshareef

Reputation: 7140

Environment.NewLine did the job

turns out that the system has this block of code

body = body.Replace("\t", " ").Replace("\n", " ").Replace("\r", " ");

Upvotes: 1

Mat
Mat

Reputation: 6725

Some places to investigate:

  • Check that the device you are receiving with understands new lines in SMS messages!
  • This similar question has an answer suggesting that you need to make sure you have encoded the message as 7-bit
  • A newline in SMS is 0x0A 0x0D not just 0x0A

Upvotes: 1

Umesh CHILAKA
Umesh CHILAKA

Reputation: 1466

Try 0X0D and 0X0A both for new line.

Upvotes: 1

Related Questions