sms-counter icon indicating copy to clipboard operation
sms-counter copied to clipboard

Update line breaks/carriage returns count as 2 characters

Open karthikbodu opened this issue 3 years ago • 1 comments

karthikbodu avatar Mar 12 '21 08:03 karthikbodu

@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.)

per-ok avatar Dec 29 '22 12:12 per-ok