If you are using facelets this character entity problem will not go
away until the next release of facelets. I have written another post
earlier about this called
"Its a bug: Facelets+MyFaces cannot serve UTF-8 and here is why!"
Randahl
Paul Pogonyshev wrote:
I wrote:
Jeff Bischoff wrote:
I haven't had any trouble using UTF-8 so far. Can you confirm that you
have the following in your pages:
<%@ page contentType="text/html; charset=utf-8" language="java" %>
...
<head>
...
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
I'm pretty sure you need both.
Yes, I do have both.
Can you be more specific about your problem? What do you mean by
"characters from Java code"?
Actually, those include both characters from Java code and simply coded
in in the page, e.g.
абвгд
<%= "абвгд" %>
both produce HTML-entities, even though Cyrillic letters are encodable
in UTF-8. This is not a problem in HTML parts (except for increased
page size), but is not appropriate in _javascript_.
Here is a simple page to check this (but I admit this might be a local
problem or JSP/JSF combination problem):
<%@ page
contentType="text/html; charset=UTF-8"
language="java"
%>
<%@ include file="/base/taglibInclude.jsp" %>
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
абвгд
<%= "абвгд" %>
<f:view>
абвгд
<%= "абвгд" %>
</f:view>
абвгд
<%= "абвгд" %>
</body>
</html>
|
- Re: charset problem Randahl Fink Isaksen
-