hello,

sorry if it was allready discuused, but I did not found any solution for my
problem..

so here it is..
my sms-box part of configuration:

group = sms-service
keyword =
keyword-regex = .*
catch-all = yes
max-messages = 0
get-url =
"http://mydomain.com/sms.php?bin=%b&smstime=%t&sender=%p&smsc=%i&id=%I&code=%c&cset=%C&bi=%B&message=%a&service=%k";

code that reads message in sms.php:

$mes_smstime = $_GET ["smstime"];
$mes_sender = $_GET ["sender"];
$mes_smsc = $_GET ["smsc"];
$mes_smsid = $_GET ["smsid"];
$mes_code = $_GET ["code"];
$mes_cset = $_GET ["cset"];
$mes_bi = $_GET ["bi"];
$mes_service = strtoupper($_GET ["service"]);
$mes_message = $_GET ["message"];

if ($mes_cset=="UTF-16BE"){

        //actually here I want to read at least something 

        $mes_service=mb_convert_encoding($mes_service,"ISO-8859-1","utf-16be");
        $mes_message=mb_convert_encoding($mes_message,"ISO-8859-1","utf-16be");

        // at this point starts my headache...
}
...

so problem is that when I open this URL through usual HTTP (in my browser
for example) with same URI - there are no problems, strins are converted and
if there is some characters that are not in the ISO charset - they are
replaced with "?" marks. but! when I receive SMS in UTF-16BE  - whole
strings are converted to "?" totally... so i get only "????????"... so I
have no clue how to read the message...


plz help.
Valeri.
-- 
View this message in context: 
http://www.nabble.com/stuck-with-ucs-2-decoding-tp20904570p20904570.html
Sent from the Kannel - User mailing list archive at Nabble.com.


Reply via email to