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

Re: About the media types text/x-php and text/x-php-source



On 2012-08-28 18:03:02 +0200, Christoph Anton Mitterer wrote:
> On Tue, 2012-08-28 at 15:37 +0100, Ian Jackson wrote:
> > > Then if there is a charset parameter, with a value that refers to
> > > some known text character set, I think that one can assume that
> > > the contents are encoded with this charset, thus can be displayed
> > > as text.
> > I don't think that follows at all.  It might just mean that the text
> > in (say) the zipfile filenames is in whatever charset is specified.
> 
> I agree... the charset parameter does not necessarily imply that one has
> plain text.
> At least for HTTP it's not defined (at least not int RFC 2616) how the
> charset= parameter is to be interpreted, and thus Ian's example is
> absolutely valid.

Concerning the interpretation of the charset= parameter, RFC 2616
doesn't seem to make a difference between text/* media types and
the other ones (the only difference seems to be the default). So,
with this point of view, conversion from bytes to characters may
also be incorrect for unknown text/* media types.

But I'd say that RFC 2616 is rather ambiguous. You can see a problem
that occurred in practice:

  https://github.com/edicl/hunchentoot/issues/1

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: