What I suspect the issue is, is that the gateway you are using (Kannel ?,
Angelica ?) does not have some functionality you depend on, or you're
doing something silly like using a non-standard character set,
windows-1251, for example, where you should be using an ISO character set.
If it is the latter, then run your programs through "demoronizer" which
will replace the non-ISO characters with their ISO equivalents.