Greetings all, and once again, thank you for answering my question.
Summary
What B4A code can I use to convert a string variable (encoded in UTF-8) to 8 bit encoding (ANSI?)?
Background
I have a set of files in different languages in my DirAssets all encoded in UTF-8. My app uses parts of these files to display information to the user. The user can select portions of these files and compose a text that he sends to email addresses he designates. This works just fine.
A second feature of the app is to send SMS. SMS has a restriction of 140 characters - better defined as 140 octets = 140 * 8 bits = 1120 bits. This works fine for ANSI, but for UTF-8, the SMS limit is 70 characters which apparently require 16 bits per character.
Question
For languages that can be supported with 8 bit characters, English, Spanish, French, Italian, etc., what B4A code can I use to convert the string variable (encoded in UTF-8) to be sent via SMS to 8 bit encoding (ANSI?)? That way, the user will be able to send the full 140 characters in the SMS.
I have looked in the Forum, in the documentation, but I cannot seem to find a solution.
Any and all help will be welcomed and appreciated.
Summary
What B4A code can I use to convert a string variable (encoded in UTF-8) to 8 bit encoding (ANSI?)?
Background
I have a set of files in different languages in my DirAssets all encoded in UTF-8. My app uses parts of these files to display information to the user. The user can select portions of these files and compose a text that he sends to email addresses he designates. This works just fine.
A second feature of the app is to send SMS. SMS has a restriction of 140 characters - better defined as 140 octets = 140 * 8 bits = 1120 bits. This works fine for ANSI, but for UTF-8, the SMS limit is 70 characters which apparently require 16 bits per character.
Question
For languages that can be supported with 8 bit characters, English, Spanish, French, Italian, etc., what B4A code can I use to convert the string variable (encoded in UTF-8) to be sent via SMS to 8 bit encoding (ANSI?)? That way, the user will be able to send the full 140 characters in the SMS.
I have looked in the Forum, in the documentation, but I cannot seem to find a solution.
Any and all help will be welcomed and appreciated.