[
https://issues.apache.org/jira/browse/OFBIZ-5383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13813610#comment-13813610 ]
Rong Nguyen commented on OFBIZ-5383:
------------------------------------
I have resolved this problem by adding a litter code in org.ofbiz.product.category.CatalogURLFilter.java
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
// extra from olbius
//request.setCharacterEncoding("UTF-8");
//response.setContentType("text/html; charset=UTF-8");
String charset = config.getInitParameter("encoding");
if (UtilValidate.isEmpty(charset)) charset = request.getCharacterEncoding();
if (UtilValidate.isEmpty(charset)) charset = "UTF-8";
if (Debug.verboseOn()) Debug.logVerbose("The character encoding of the request is: [" + request.getCharacterEncoding() + "]. The character encoding we will use for the request and response is: [" + charset + "]", module);
if (!"none".equals(charset)) {
request.setCharacterEncoding(charset);
}
// setup content type
String contentType = config.getInitParameter("contenttype");
if (UtilValidate.isEmpty(contentType)) contentType = request.getContentType();
if (UtilValidate.isEmpty(contentType)) contentType = "text/html";
if (charset.length() > 0 && !"none".equals(charset)) {
response.setContentType(contentType + "; charset=" + charset);
response.setCharacterEncoding(charset);
} else {
response.setContentType(contentType);
}
// End
> Utf8 error in front site ecommerce
> ----------------------------------
>
> Key: OFBIZ-5383
> URL:
https://issues.apache.org/jira/browse/OFBIZ-5383> Project: OFBiz
> Issue Type: Bug
> Components: specialpurpose/ecommerce
> Affects Versions: SVN trunk
> Environment: Ubuntu 13.10
> Reporter: Rong Nguyen
>
> When i register new user, if i input utf8 format(Vietnamese) for content, the content will have error content.
> For example: if i input "Hà Nội", the content after saving will be "HÃ Ná» i"
--
This message was sent by Atlassian JIRA
(v6.1#6144)