Paul,

So is the idea then to convert everything to UTF-8 within wap-appl and then only serve UTF-8 to the phones (as they are required to support at least UTF-8 if nothing else)? This would also mean stripping the encoding= section if it exists as UTF-8 is assumed if it's not present.

... To convert everything to UTF8 or leave encoding as-is if phone supports it. Strip preamble. Store somewhere in which encoding we have xml now. When parsing, do not mess up with encoding - just call xmlReadMemory instead of xmlParseMemory and pass stored encoding to it. This change will also allow us to specify some options like XML_PARSE_RECOVER. When producing binary, (*wbxml)->character_set = our_stored_charset.

Summarizing that, we need:
1. Function to mess with encoding and strip preamble just after we got http 
reply. Call it
from return_reply. Remove copy&paste-programming artifacts from these.
2. Slight change in wml_compile(). Just remove all mess.
3. Slight change in (*wbxml)->character_set = line

If I'm correct on this, I'll start work on it. As I'd said yesterday, I really just want to get a patch committed so I can put this code into production.

I was a little busy dealing with canadian embassy last week. And just after I send this message I will be cut off internet until tomorrow noon. After that, I can try to do described changes myself. But I don't expect any difficulties.

It's a lot more detailed of a change than I was thinking. I'll happily wait for you to get at it if indeed you have the time. If not, I can try my hand at it and pass it by you for verification. Just let me know. Our maintenance window was this morning so I'm already past the deadline I was shooting for. Thanks!

Jon



Reply via email to