You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending SMS, newlines will be counted as 2 chars. Currently the code does not handle this (besides \r\n).
Find below my fix for this to rectify this issue.
main.py 18-21
NL_CHARS = {
'\n': 10,
'\r': 13
}
main.py 76-88
nl_count = 0
for index, c in enumerate(textlist):
if c == cls.NL_CHARS['\n']:
if index >= 1 and textlist[index - 1] == cls.NL_CHARS['\r']:
# If part of \r\n keep count same (remove 1 as chars counted as 2 in first place)
nl_count -= 1
continue
nl_count += 1
elif c == cls.NL_CHARS['\r']:
nl_count += 1
length += nl_count
Activity