Ok good !
Accents spend up correctly on GSM like that!
But I have more 160 characters ... :-(
SMS Send:
J31 18 20:30 Csb/Lok 19 20:00 Wes/Mon 20:00 Zwa/Cha 20:00 Rou/Mal 20:00
Bru/Mou 20:00 Gnk/Den 20:00 Gba/Str 20 18:00 Gan/Fcb 20:30 Sta/And
Log :
2008-04-18 19:03:35 [20275] [6] DEBUG: data: 00 4a 00 33 00 31 00
20 00 20 00 31 00 38 00 20 .J.3.1. . .1.8.
2008-04-18 19:03:35 [20275] [6] DEBUG: data: 00 32 00 30 00 3a 00
33 00 30 00 20 00 43 00 73 .2.0.:.3.0. .C.s
2008-04-18 19:03:35 [20275] [6] DEBUG: data: 00 62 00 2f 00 4c 00
6f 00 6b 00 20 00 31 00 39 .b./.L.o.k. .1.9
2008-04-18 19:03:35 [20275] [6] DEBUG: data: 00 20 00 32 00 30 00
3a 00 30 00 30 00 20 00 57 . .2.0.:.0.0. .W
2008-04-18 19:03:35 [20275] [6] DEBUG: data: 00 65 00 73 00 2f 00
4d 00 6f 00 6e 00 20 00 32 .e.s./.M.o.n. .2
2008-04-18 19:03:35 [20275] [6] DEBUG: data: 00 30 00 3a 00 30 00
30 00 20 00 5a 00 77 00 61 .0.:.0.0. .Z.w.a
2008-04-18 19:03:35 [20275] [6] DEBUG: data: 00 2f 00 43 00 68 00
61 00 20 00 32 00 30 00 3a ./.C.h.a. .2.0.:
2008-04-18 19:03:35 [20275] [6] DEBUG: data: 00 30 00 30 00 20 00
52 00 6f 00 75 00 2f 00 4d .0.0. .R.o.u./.M
2008-04-18 19:03:35 [20275] [6] DEBUG: data: 00 61 00 6c 00 20 00
32 00 30 00 3a .a.l. .2.0.:
Help ..
Jovan Kostovski a écrit :
On Wed, Apr 16, 2008 at 8:37 PM, Mickael - System Administrator (WebD
Services) <[EMAIL PROTECTED]> wrote:
Hello,
By default, the characters "éèê etc. .." Not working.
You can try using the default GSM7 alphabet.
The only character that is missing in this aphabet is ê.
Here is the error:
Charset or body misformed, rejected
My PHP code: (the $content and the PHP script is UTF-8 encoded)
$text = iconv('UTF-8', 'UCS-2', $content);
$url =
"http://localhost:1425/outgoing/reports_kannel.php?number=%p&senderid=%P&smsc=%i&dlr-type=%d&time=%t&msgid="
. $msgid;
$gateway = "username=" . urlencode('myuser')."&";
$gateway .= "password=" . urlencode('mypass')."&";
$gateway .= "to=" . urlencode($number)."&";
$gateway .= "from=" . urlencode($senderid)."&";
$gateway .= "text=" . urlencode($content)."&";
$gateway .= "dlr-url=".urlencode($url)."&";
$gateway .= "dlr-mask=23&"; // 31 = All
$gateway .= "charset=UTF16-BE&";
$gateway .= "coding=2&";
$gateway .= "smsc=1";
Thank you !
Mickael
Kannel uses iconv internaly. You don't have to convert the message
text in your script.
comment the line :
$text = iconv('UTF-8', 'UCS-2', $content);
and set
$gateway .= "charset=UTF-8";
$gateway .= "coding=2";
BR, Jovan