lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wednesday 09 February 2005 07:11, Diego Nehab wrote:
> provide an iterator that returns (charset, decoded text).
which would directly reflect the technical structure
and thus be best to pass around such data in the most accurate way
even if completely ignorant about the actual definition of any charset

>         if charset ~= "iso-8859-1" then ignore(value) -- :)
oops - no alpha channel :(

> Is that good enough?
well, yes

>From another point of view,
headers logically have flat values in an abstract universal charset
(with unicode being good enough for all practical purposes).
Using different actual character encodings is an implementation
detail not that much different from quoted printable -
it just requires a more complicated decoder.

Personally I'd like to pass a straighten-this-out callback
and then retrieve plain headers; however, this is easy to
wrap around the iterator approach.