M
Malcolm
Hi, all.
I was wondering if someone could tell me what i do wrong. I've got a
web-application (i use Struts 1.1) and i need to print strings
containing data in russian. This is the page-source, but it prints
invalid data ('?' characters istead of russian symbols).
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html locale="true">
<head>
<html:base />
<title><bean:message key="show.title" /></title>
</head>
<body>
<h2><bean:message key="show.top" /></h2>
<hr width="400" align="left" />
<logic:iterate id="article" collection="<%= ((java.util.LinkedList)
request.getAttribute("results")).iterator() %>">
<p>
<b>
<bean:write name="article" property="headline" />
</b>
[<bean:write name="article" property="topic" />]<br />
<i>
<bean:write name="article" property="magazineName" />--
<bean:write name="article" property="issue" />
</i><br />
<bean:write name="article" property="body" />
</p>
</logic:iterate>
</body>
</html:html>
Such behaviour looks like printing unicode symbols in ISO-8859-1. How
can I change the default charset of output. I didn't manage to do it by
just putting the <meta> tag specifing charset of Cp1251. May be I can
set the encoding of the page to UTF-8, for example. Is it possible by
editing Struts config files?
Thanks for any advice!
Best regards, Yevgen Malafeyev AKA Malcolm.
I was wondering if someone could tell me what i do wrong. I've got a
web-application (i use Struts 1.1) and i need to print strings
containing data in russian. This is the page-source, but it prints
invalid data ('?' characters istead of russian symbols).
<%@ page language="java" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html locale="true">
<head>
<html:base />
<title><bean:message key="show.title" /></title>
</head>
<body>
<h2><bean:message key="show.top" /></h2>
<hr width="400" align="left" />
<logic:iterate id="article" collection="<%= ((java.util.LinkedList)
request.getAttribute("results")).iterator() %>">
<p>
<b>
<bean:write name="article" property="headline" />
</b>
[<bean:write name="article" property="topic" />]<br />
<i>
<bean:write name="article" property="magazineName" />--
<bean:write name="article" property="issue" />
</i><br />
<bean:write name="article" property="body" />
</p>
</logic:iterate>
</body>
</html:html>
Such behaviour looks like printing unicode symbols in ISO-8859-1. How
can I change the default charset of output. I didn't manage to do it by
just putting the <meta> tag specifing charset of Cp1251. May be I can
set the encoding of the page to UTF-8, for example. Is it possible by
editing Struts config files?
Thanks for any advice!
Best regards, Yevgen Malafeyev AKA Malcolm.