Artifacts Associated With Ticket 1733261
Ticket change [8fbf12d98f] (rid 120323) by rniva on 2007-06-08 07:56:46:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This snippet of code from http::Event assumes that all non-text content is binary: if {$state(-binary) || ![string match -nocase text* $state(type)] || [string match *gzip* $state(coding)] || [string match *compress* $state(coding)]} { # Turn off conversions for non-text data fconfigure $s -translation binary We are using the http package to download RSS feeds in UTF-8 encoding. Mimetype: application/rss+xml And the client is running system encoding UTF-8. This causes the RSS feed to have double UTF-8 encoded strings. We did a temporary fix to our client while we wait for a bugfix: if {$state(-binary) || (![string match -nocase text* $state(type)] && ![string match -nocase *xml* $state(type)]) - foundin initialized to: "obsolete: 8.4.15"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "rniva"
- subsystem initialized to: "29. http Package"
- title initialized to: "http::Event encoding (RSS/UTF-8)"
- type initialized to: "Bug"
Ticket change [1f7b444358] (rid 91153) by dkf on 2007-06-08 15:07:31:
- icomment:
Logged In: YES user_id=79902 Originator: NO set decoded [encoding convertfrom utf-8 [http::data $token]]
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [b4b8839682] (rid 125093) by rniva on 2007-06-08 15:21:16:
- icomment:
Logged In: YES user_id=729740 Originator: YES >set decoded [encoding convertfrom utf-8 [http::data $token]] Yes, this is what I first thought of, but I don't think we can assume that every RSS feed is in UTF-8? Besides there are other application/*+xml types that should also be handled in http::Event.
- login: "rniva"
- mimetype: "text/plain"
- username: "rniva"
- icomment:
Ticket change [a184b6ddec] (rid 109730) by dkf on 2007-06-08 16:42:27:
- icomment:
Logged In: YES user_id=79902 Originator: NO Well, when you're not certain what is going on with the encoding you *really* want the data in binary form and then (after picking apart WTF is going on) using [encoding convertfrom]. Like that you stand a chance of actually getting to a meeting of minds with the webserver (assuming that's not fundamentally confused, which happens unfortunately often...)
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [476e574415] (rid 99704) by hobbs on 2007-06-11 03:58:46:
- closedate changed to: "2007-06-10T20:58:46"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 Originator: NO Doesn't the 'charset' field of the state array deal with this for you? Convert to the named charset when present.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Pending"
- username: "hobbs"
Ticket change [f3d1f05b7c] (rid 129789) by rniva on 2007-06-11 14:54:01:
- icomment:
Logged In: YES user_id=729740 Originator: YES Probably, but isn't that a "private" variable? There should, at the very least, exist a proc for returning the content-type so you don't have to muck around with variables that may change in a future version.
- login: "rniva"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "rniva"
- icomment:
Ticket change [864b00ee71] (rid 131484) by hobbs on 2007-06-13 02:13:46:
- closedate changed to: "2007-06-12T19:13:46"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 Originator: NO The charset key of the state variable is a documented key, along with how to access it, in the http docs.
- login: "hobbs"
- mimetype: "text/plain"
- status changed to: "Pending"
- username: "hobbs"
Ticket change [59f8e1f27f] (rid 118061) by rniva on 2007-06-13 14:52:38:
- closedate changed to: "2007-06-13T07:52:38"
- closer changed to: "rniva"
- icomment:
Logged In: YES user_id=729740 Originator: YES I bow down to the wisdom of the great elders of tickle. Thanks for prompt responses and patience with my ignorance.
- login: "rniva"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "rniva"