I’m developing an sms application in c#. The service that I use to send a message only allows characters form the 7 bit alphabet. I’m looking for a way to check if a message only contains characters from this alphabet.
My first idea was to split the message into a character array and then loop these characters and compare them to the alphabet. But I bet there is a much better.
7 big alphabet:
http://www.dreamfabric.com/sms/default_alphabet.html
You can find a utility GSM Encoding class (it simply derives from the abstract System.Text.Encoding) defined here: The GSM character set in .NET. I think this is the most elegant and reusable way.