Jörg Pommnitz
2001-04-30 15:59:42 UTC
Hi List,
as announced I have worked to get Unicode characters over SMS.
Sorry, the result is not fit for publication (it's a risk for
public health; you might lose your lunch).
Anyway, here is a short description on how I did it:
1. The HTTP interface: add a new CGI parameter "encoding"
2. The smsbox/bearerbox message: add a new field encoding. The
field is an integer value that takes the MIBenum value assigned
to different encodings by the IANA.
3. A new function "octstr_recode" that recodes a octstr from one
encoding scheme to another (based on iconv()).
Putting these three things together I modified pdu_encode to support
the Data Coding Scheme UCS2.
The following command:
lynx -dump
"http://localhost:8090/cgi-bin/sendsms?user=foo&password=bar&from=1234&to=12
345&text=%c3%84&encoding=utf-8"
translates to the following PDU:
0011000C919471819957290008A70200C4
A Nokia 7110 from Taiwan (Language setting "Chinese") properly displays
the message.
Open problems:
1. protect public health by cleaning up the code
2. Message size calculation.
Regards
Jörg
as announced I have worked to get Unicode characters over SMS.
Sorry, the result is not fit for publication (it's a risk for
public health; you might lose your lunch).
Anyway, here is a short description on how I did it:
1. The HTTP interface: add a new CGI parameter "encoding"
2. The smsbox/bearerbox message: add a new field encoding. The
field is an integer value that takes the MIBenum value assigned
to different encodings by the IANA.
3. A new function "octstr_recode" that recodes a octstr from one
encoding scheme to another (based on iconv()).
Putting these three things together I modified pdu_encode to support
the Data Coding Scheme UCS2.
The following command:
lynx -dump
"http://localhost:8090/cgi-bin/sendsms?user=foo&password=bar&from=1234&to=12
345&text=%c3%84&encoding=utf-8"
translates to the following PDU:
0011000C919471819957290008A70200C4
A Nokia 7110 from Taiwan (Language setting "Chinese") properly displays
the message.
Open problems:
1. protect public health by cleaning up the code
2. Message size calculation.
Regards
Jörg