> There are still some issues with using views, mainly that they both > fight of setting content-type...and since REST sets it already, the view > never sets it, which is good, but also the charset=utf isn't set either...
Just to solidify that statement...
__load_content_plugins sets the response content type to the strict
mapping itself sans the charset= part. Things like the TT view add the
charset=utf-8 if not encoding is set, but it already is, but that gets
trashed between the two, making using REST + UTF-8 producing views a
pita at first, and setting content_encoding makes no difference in some
browsers.
Ultimately, doing this in the views template does the right thing:
> [% CALL c.response.content_type('text/html; charset=utf-8') -%]
or
> [% CALL c.response.content_type('text/plain; charset=utf-8') -%]
which imho is the better option, since each individual template
file/view may even use a different encoding...each view can tweak the
encoding, and not rely in the magic inner workings of REST when using views.
-=Chris
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
