request.getCharacterEncoding() returns NULL… why?

前端 未结 2 1305
灰色年华
灰色年华 2020-12-31 18:33

A coworker of mine created a basic contact-us type form, which is mangling accented characters (è, é, à, etc). We\'re using KonaKart a Java e-commerce platform on Struts 1.

2条回答
  •  天涯浪人
    2020-12-31 19:03

    The request.getCharacterEncoding() relies on the Content-Type request attribute, not Accept-Charset

    So application/x-www-form-urlencoded;charset=IS08859_1 should work for the POST action. The <%@page tag doesn't affect the POST data.

提交回复
热议问题