I'm using a Properties file to store the String for the JSP application. And then, by using JSTL FMT tags, I display the texts.
The problem is with some of the special characters like ç,ğ,ö,ş,ı etc.
Ex: Comment ça marche gets displayed as Comment ça marche.
On the JSP, I have the following code.
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="tags" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<fmt:setBundle basename="messages/messages_common" var="messages"/>
.
.
.
<fmt:message key="home.text" bundle="${messages}"/>
I found one solution, where it asked to encode the Properties file. Although this being successful, leads problems when maintaining some translations.
How to fix this issue without encoding the properties file?
Thanks and best regards.
Edit:
In the properties file, the text looks like following.
home.text = Comment ça marche
Edit 2:
By encoding I meant doing the following;
native2ascii -encoding UTF-8 messages_common.properties.org messages_common.properties