Problem with enconding: JSTL fmt

0

I'm using fmt to do internationalization of texts on a page. It turns out that when using accents, the text gets strange characters. I tried to change:

<fmt:requestEncoding value="UTF-8" />

but there was no difference. Is there any extra configuration that should be done?

edit:

Header on page

<%@ page contentType="text/html; charset=UTF-8" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:setLocale value="pt_BR"/>
<fmt:setBundle basename="messages" />

Usage:

<h5><fmt:message key="action"/></h5>

file messages_en_properties:

action = Ação
    
asked by anonymous 05.09.2016 / 15:58

1 answer

0

It's no use just to change the encoding in the fmt tag if the displayed information is saved using another encoding. Checks the encoding used in the database or language files you are using to load the information displayed on this screen. If you need to modify the encoding, you must also modify it in the data source to make it compatible with the fmt tag.

    
06.09.2016 / 13:21