Reputation: 1475
<%@page pageEncoding="ISO-8859-1" contentType="text/html; charset=ISO-8859-1" %>
While using the above directive in the JSP page, it can't display Russian and Hungarian characters in the JSP page.
Is there any way to support Russian and Hungarian characters in the same JSP page?
If I use charset="UTF8"
, fine, or is there any other way?
Upvotes: 0
Views: 7401
Reputation: 1108712
The ISO 8859-1 charset supports only the characters which are listed here. You'll see that it does not cover Cyrillic characters at all, only Latin characters. You really need to use UTF-8 instead if you want world domination.
<%@page pageEncoding="UTF-8" %>
Instead of editing every individual JSP to add the @page pageEncoding
, you can also add the following entry to your /WEB-INF/web.xml
file:
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<page-encoding>UTF-8</page-encoding>
</jsp-property-group>
</jsp-config>
Upvotes: 11