On 12/16/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
<snip/>
> >>> make sure that you have the UFT-8 charsett declared in the content type
> >>> of the response -- e.g. with <%@ page contentType="text/html;
> >>> charset=UTF-8"%> and/or HTML META-tags.
> >>>
> >>> L.
>
> So, here the most important part of my JSP code:
>
> <head>
> <html:base/>
> <title>test</title>
> <META http-equiv="Content-Type" content="text/html;charset=UTF-8">
> </head>
>
<snap/>

Do you have the JSP page directive set as suggested above? The HTML
<META> tags are best considered to be "hints".

-Rahul


> <%
>
> /*
> * +++ TEST CASE 1 +++
> */
>
> // business logic for obtaining all hibernated objects
> BOGeneric bo = new BOGeneric();
> List l = bo.find("ChinaText", new Criterion[] {}, new Order[] {});
> pageContext.setAttribute("names", l);
>
> // runs it throung and prints out all the texts
> for (Iterator i=l.iterator(); i.hasNext();) {
>        out.println(((ChinaText)i.next()).getText() + " : ");
> }
> %>
>
> <!--
> +++ TEST CASE 2 +++
> now the same using struts
> -->
> <logic:iterate id="chinatext" collection="<%=l%>">
>        <bean:write name="chinatext" property="text"/> -
> </logic:iterate>
>
> In the first test case I get correct encoded chinese texts. In the second
> one I get only &#xxxx strings.
>
<snip/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to