On Friday 17 January 2003 07:03, Shapira, Yoav wrote:

> Howdy,
> Perhaps this will shed some light.  See Issue 1 at
> http://www.jcp.org/aboutJava/communityprocess/maintenance/jsr053/errata_
> 1_2_a_20020321.html
>
> Yoav Shapira
> Millennium ChemInformatics

This sort of fixed it.  It fixed one problem, but dug a bigger hole elsewhere.

The charset header is now fixed.  However, the problem that remains now is 
that struts doesn't load up the resources properly.  The messages that get 
pumped out to the page end up as a bunch of question marks.

To fix this, I wrote my own tag library to read in the struts messages, and 
output them:

String value=(String)messages.getMessage(key);
try {
        byte[] text=value.getBytes("iso-8859-1") ;
        value=new String(text,"gb2312") ;
} catch( java.io.UnsupportedEncodingException uee ) {
}
JspWriter.out(value) ;

It should be clear that this isn't a valid solution either.  If support for 
languages other than English and mainland Chinese is desired, a lot of 
branching code will be needed here.

Thanks.

Daniel

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

Reply via email to