Seeing ?????? instead of understandable characters (and even instead of Mojibake ) it usually indicates that responsible data transmission is itself very knowledgeable about the encoding used both at the source and at the destination. On average, a web application has only 2 places where it is: the point when data is transferred to / from the JDBC database and the point when data is transferred to the HTTP response from response.getWriter() (as JSP is implicitly used).
In your particular case with properties files, there is no means for the database, so the HTTP response remains the main suspect. This problem may occur if the server was not prompted to use UTF-8 to decode the characters that are written in the HTTP response, but instead uses some standard platform encoding, most often ISO-8859-1. Thus, any character in the source that is not covered by ISO-8859-1 will be turned into a question mark. Since ISO-8859-1 is exclusively for Latin characters, this will affect all non-Latin characters, such as Chinese, Japanese, Arabic, Cyrillic, Hebrew, Sanskrit, etc. They will all be written as question marks.
This can be fixed based on the JSP by adding the following to the very top of the JSP:
<%@page pageEncoding="UTF-8" %>
(note that you really need to put this in every JSP as well as the included files!)
Or, better, fix it based on the application by adding the following entry to webapp web.xml :
<jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <page-encoding>UTF-8</page-encoding> </jsp-property-group> </jsp-config>
See also:
Balusc
source share