Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update line breaks/carriage returns count as 2 characters #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karthikbodu
Copy link

No description provided.

@per-ok
Copy link

per-ok commented Dec 29, 2022

@karthikbodu I believe you are incorrect. A normal line break in the SMS context consists of two characters called CR and LF. (CR and LF corresponds to '\r' and '\n'.) They shall be counted as separate characters, which they are in the current implementation.
The tradition from the C language, where the '\n' character has been interpreted as the CR and LF combined does not apply here.

(You may of course create your own "compiler" on top of the current solution that does this for you, but the current solution is correct.)

See chapter 4 in ETSI TS 123 038 v 10.0.0. (I know there are later versions, but I cannot see any reason for changing this. Backwards compatibility is too important.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants