Strange output in UTF-16BE

"Sagi Mann" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi,
I have the following issue in kannel 1.4.1:

My smsbox is configured to exec the following command for the default keyword:
echo "%C|%b"

I have a cellphone that send data in UTF-16BE charset. I send an sms
with the single digit '1'. This is what gets echoed:

UTF-16BE|%0E%001

When the phone is configured to write right-to-left text (hebrew in my
case), then the same digit arrives as:

UTF-16BE|%0F%001
i.e. the 'E' turned to F.

In any case, the Kannel doc says that the %b parameter will print the
original sms in binary form. Yet, the text above does not seem to be
in UTF-16BE charset. In other words, the binary buffer { 0x0f, 0x00,
0x31 } is not a valid UTF-16BE string. This is quite easy to see,
since UTF-16 charsets must ALWAYS come in 16-bit elements: 2 bytes, 4
bytes, 6 bytes, 8 bytes, etc. The buffer above is 3 bytes long.

any ideas why Kannel states this is a UTF-16BE message but provides it
in some different encoding? How am I supposed to decode this back into
the original string of "1" ?

thanks...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.