Hi,
On Apr 11, 2011 12:25am, Pavel Kunc <[email protected]> wrote:
This has been problem for loooong time and we have been forced to do
crazy things. While Rack is in development it goes slow and some
patches including patch for support of Encoding in Ruby 1.9.x are
still not there.
The result is that what comes from Rack is not what you might expect
and that leads to nasty exceptions about incompatible encoding as we
all know them. It happen during POST, sometimes get and so on.
There's a bit in the Rack specs:
"The input stream is an IO-like object which contains the raw HTTP POST
data. When applicable, its external encoding must be “ASCII-8BIT” and it
must be opened in binary mode, for Ruby 1.9 compatibility."
http://rack.rubyforge.org/doc/SPEC.html
So the external (and internal) encoding of the input object given by Rack
could be set in the Rack stack when using Ruby 1.9 as long as it is
a "proper enough" IO, or wrapped so that the mandatory methods deliver
ASCII..UTF-8. The spec still has a bunch of holes regarding it, but
handling that and the encoding of the environment variables in
Merb::Rack::Application before it even hits the dispatcher sounds good to
me.
--
You received this message because you are subscribed to the Google Groups
"merb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/merb?hl=en.