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

Re: Requiring charset parameter on +xml types?


> - For text/html+xml (and that would work for all types, actually),
>    beef up the servers so that they can use the information in the
>    file to set the charset parameter correctly.

Matt Sergeant has already implemented a Perl module "Apache::MimeXML".  
Let's encourage such implementation efforts!


>     Apache::MimeXML - mod_perl mime encoding sniffer for XML files
>     Simply add this line to srm.conf or httpd.conf:
>       PerlTypeHandler +Apache::MimeXML
>     Alternatively add it only for certain files or directories using
>     the standard Apache methods. There is about a 30% slowdown for
>     files using this module, so you probably want to restrict it to
>     certain XML locations only.
>     An XML Content-Type sniffer. This module reads the encoding
>     attribute in the xml declaration and returns an appropriate
>     content-type heading. If no encoding declaration is found it
>     returns utf-8 or utf-16 depending on the specific encoding.


IBM Tokyo Research Lab &
International University of Japan, Research Institute