[Huawei P9 ROMs, Kernels, Recoveries, & Other Devel] zgfg:
Your Pollish letter 'Ą' (A with Ogonek?) is not supported by either Basic or shifted 7-bit encoding, neither by their extended character sets:

https://en.m.wikipedia.org/wiki/GSM_03.38

Instead, it must use UCS-2 encoding, taking 2 bytes (16 bts) for each character.

With UCS-2, non-concatenated SMS with 140 bytes placeholder for text can contain up to 70 2-byte characters, hence you have 69 spaces left.

Try different experiment:

Type in just Euro sign, it will show 158 leftover spaces (Euro is extended character but still supported by 7-bit encoding, taking 14 bits where first 7 bits go for escape control).

Replace Euro by Dollar or Pound sign (older and more 'standard'), it will show 159 leftover spaces (For Dollar or Pound just 7 bits are eough).

Or try instead 'Ü' (U Umlaut), you will again have 159 spaces left.

7-bit encoding, non-concatenated SMS with 140 bytes placeholder for text can contain up to 160 7-bit characters, hence you have 158 or 159 spaces left.

See attached screenshots.

---

Some theory behind SMS characters encoding (sorry for going off-topic)

a) Text placeholder in an SMS contains 140 bytes or 140*8 bits. If encoded by (standard or default) 7-bit SMS encoding, it accomodates for the text length of 140*8/7=160 standard characters.

b) Longer text must be sent by a concatenated SMS consisting of several segments. Usually you pay for each segment as for an additional SMS.

Segments require concatenation headers of 6 bytes, plus 1 padding bit in case of 7-bit encoding ,taking* altogether 48+1=49 =7*7 bits, hence instead of 160 characters, each segment accommodates up to 160-7=153 7-bit encoded characters:

https://en.m.wikipedia.org/wiki/Concatenated_SMS

Example 1: Type 159 times letter 'a' and counter must show 1 place was left - you are stilll in single-segment, non-concatenated SMS.

Add two more letters 'a' (161 in total) and you are already in the 2nd segment of a now concatenated SMS. First segment accomodates 153 letters 'a' and second segment 8 remaining letters 'a' - hence counter must show 153-8=145 leftover places for that 2nd segment.

c) 7-bit encoding supports 2^7=128 different characters. Actually 1 less being used for the escape control

http://www.developershome.com/sms/gsmAlphabet.asp

Hence we have 127 characters that are encoded each by 7 -bit combinations, and 10 additional extended characters where each of them is encoded by 14 bits: 7bit escape scontrol + 7-bit its own combination.

Example 2: Type 10 times letter 'a' and 3 times tilde '~'. It eats 10 + 3*=16 places, hence counter must show that 144 places are left in this single-segment non-concatenated SMS.

Counting gets more nasty if you go with extended characters int the concatenated SMS.

d) Instead of default Basic (originally Latin 1) 7-bit encoding, few specific languages are given their own shifted character sets: Turkish, Spanish and Portuguese (and ten languages from India)

https://en.m.wikipedia.org/wiki/GSM_03.38

E.g., for Turkish, you have 127 characters (encoded by 7 bits each) + 21 extended characters (encoded again by 14 bits each, where first 7 bits go for the escape control).

AFAIK, to switch from default Basic 7-bit encoding to a shifted 7-bit character sets, you must switch the phone language but it may also depend on the hosted or subscribers network.

e) For more characters (Chinese, Japanese, emoticons, etc.) SMS must be encoded by UCS-2, with each character using fixed two bytes:

http://www.columbia.edu/kermit/ucs2.html

In this case, non-concatenated SMS can contain up to 70 characters (fitting into the 140 bytes placeholder).

If concatenated, each segment accmodates up to 67 characters (134 bytes for placeholder and 6 bytes for concatenation header).

Theoretically, concatenated SMS could be encoded with each segment by different scheme (one segment by Basic 7-bit encoding, another by shifted 7-bit encoding, and yet another by UCS-2).

However, in practice, whenever you type in just one character that does not fit into the Basic (or your shifted) 7-bit encoding but requires UCS-2, SMS app will reformat the whole text (all segments) into UCS-2 encoding.

For that reason counting of 'leftover' characters may dynamicaly jump up and down, showing 'strange' results.

Or, it gives up and left until you press Send, at which time it will decide on encoding scheme and the corresponding formatting of segmets (if needed).