You are right that there should be such a middleware in Ring.

On 8月13日, 下午6时40分, James Reeves <jree...@weavejester.com> wrote:
> 2010/8/13 limux <liumengji...@gmail.com>:
>
> > Then, if Ring doesn't care of the charset also, there is no one, suck
> > as jetty, ring, compojure would take care of the charset except
> > myself. There are many peopole come from all kinds of country or
> > region who use ring, jetty and compojure. Let themselves set the right
> > charset manually by wrap? I don't think that is a good idea.
>
> Well, the charset could potentially be set to the default encoding of
> the JVM, but that might produce inconsistent results. If you develop
> of a JVM with a default encoding of X, but your production machine has
> a default encoding of Y, you'll run into problems.
>
> Another option is to have a default charset, such as UTF-8. I don't
> think Ring should have a default charset, because it's too "low
> level". But Compojure could be set up with a default charset. However,
> this won't help people who, say, use Shift-JIS.
>
> I think it would be worth adding some charset setting middleware to
> Ring, though, and perhaps document this behaviour. Github has new
> Wikis that I'd like to try out :)
>
> - James

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to