Well, after many hours of digging, I found that sms is transmitted perfectly if it has length up to 160 characters. Note that, in kannel.conf on group = smsc section I use alt-charset = "UTF-8" and on db INSERT also (charset field).
But, as I figured out (smsccon.c - int smscconn_send(SMSCConn *conn,
Msg *msg)), when SMS has more than 160 characters then it changes path
and is transmitted data that comes from the below code:
parts = sms_split(msg, NULL, NULL, NULL, NULL, 1,
counter_increase(split_msg_counter) & 0xff, 0xff,
conn->max_sms_octets);
which loses data with greek characters. That's because the data that
comes from sqlbox (for example for greek letter DELTA [Δ]) isn't utf-8
(which means U+0394 - ce 94) but ASCII value 0x10.
I won't examine why is this comes this way, but to I patched it for
myself (sms.c) so I have a workaround for it.
In a few words, when program flow comes into
extract_msgdata_part_by_coding() function and sms_msgdata_len()
function, thinks data is utf-8 but it is GSM encoded (Note that, all
characters that I insert INTO send_sms table are url-encoded ex.
%10%12 etc).
All the trick is done with functions charset_gsm_to_utf8() &
charset_utf8_to_gsm() at the points that have the remark text
// mnakos PATCH 2011-05-04 (concat problem fix)
I have the sms.c file attached. I hope it will by stayed attached and
save someone's desperate time like I was.
sms.c.gz
Description: GNU Zip compressed data
