Re: [PATCH] Default charset patch (bug 0000068)

Paul P Komkoff Jr <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Department of Fish & Wildlife
Message-ID <[email protected]>
Replying to Stipe Tolj:
> ok, reading this, it means from the point of logic:
> If there has not been an Accept-Charset header with utf-8, you add it 
> directly. But, when I look into how List *charset is filled, I see in 
> gw/xml_shared.c:77 that UTF-8 is added anyway in the "rest" of the #else 
> that you do. Right? So where is the benefit here?

Benefit is that I don't add other charsets, which wml_charsets add and
which going to confuse things further.

> means, pick the charset from the xml preamble via find_charset_encoding(), 
> otherwise, check if the HTTP response header gave a charset back, otherwise 
> pick utf-8 as default. Right?

Yes.

> this #ifdef assumes that you device definetly supports utf-8??? How do you 
> garanetee this?
> 
> There may be devices that do not?!
> 
> I think the present logic (inside the #else section of the patch), does it 
> the right way: convert to utf-8 _only_ when the device has stated via it's 
> headers taht it supports it. Right?

I was trying to remember my reasoning when I did this. No luck. Maybe
too late. Unfortunately, proof-of-concept wapsite was wiped out, so I
cannot prove or disprove you.

One case which works badly in unpatched version - when <?xml
encoding?> is set but server changed encoding to something evil which
he sees in accept-charset headers.

Right now it all seems not so obvious. I will redo this stuff and try
to see what pops up next.

-- 
Paul P 'Stingray' Komkoff Jr // http://stingr.net/key <- my pgp key
 This message represents the official view of the voices in my head
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.