> -----Original Message----- > From: Paul P Komkoff Jr [mailto:[EMAIL PROTECTED] > Sent: Sunday, February 22, 2004 11:28 PM > To: [EMAIL PROTECTED] > Subject: charset stuff > > > I was jumping around like mad because some sites aren't working. > Some digging shows that it is because we got wrong charset body > without correct charset header. > More deeper digging involved Russian Apache default config (which says > that mobile User-Agents are braindead and all and any ;charset= header > portion should be killed regardless of result body encoding).
I had the same troubles when try to update to newest version of kannel.
Previously used - kannel-1.2.1 + SAR patched.
In my case many content providers use any of UTF-8, ISO-8859-5,
WINDOWS-1251, KOI8-r cyrillic charsets, and indicate it either in the
Content-Type HTTP reply header or xml preamble.
All of it works with ver-1.2.1, because 1.2.1 has not code blocks that adapt
content body's charset to device in wap_appl.c and wml_compiler.c, and
always return binary wmlc data in UTF-8.
Considering adapt content feature in newest version, content with this
charsets seems must to be work ok, but don't. Allow me to express one's
thoughts about why it may happens...
. first of all... device_headers == NULL for S_MethodInvoke_Ind in
return_reply.
for S_MethodInvoke_Ind device_headers must be =
orig_event->u.S_MethodInvoke_Ind.session_headers, not .request_headers like
in S_Unit_MethodInvoke_Ind.
. error in comparison (octstr_case_compare(charset, octstr_imm("UTF-8")) <
0) in return_reply and wml_compile. It must be !=0, because for any of
WINDOWS-125X octstr_case_compare return 1.
. in return_reply content charset adoption must be based on both charset
indication (http header and xml preamble), and in 2-nd case will delete it
indication.
I propose to examine following attached patch that imho corrects above.
PS:
Don't forget update libxml for security reason according to
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0110
charset.patch
Description: Binary data
