Hi,

I went through IncludeTag.java and put a few debug statements, and found out that 
PageResponse.getCharacterEncoding() gives ISO-8859-1 while 
System.getProperty("file.encoding") gives Cp1252. By setting 
webwork.i18n.encoding=ISO-8859-1 in webwork.properties, the problem was resolved.

I believe the problem was with the fact that I'm using Windows, and even though Cp1252 
and ISO-8859-1   are supposed to be equivalent, it turned out that they weren't (and I 
don't know why). And although the files were in UTF-8 encoding, the response was in 
ISO-8859-1, which is a mystery to me as well... but anyways the problem turned out to 
be a simple fix, so I'm happy!! Thanks a lot guys!

James

-----Original Message-----
From: James Pan 
Sent: October 30, 2003 10:49 AM
To: [EMAIL PROTECTED]
Subject: RE: Spam:[OS-webwork] Again: internationalization problems


AND ONE MORE THING:

I noticed

<webwork:include ... /> tag doesn't work too well with utf-8 stuff.

Symptom:
1) I have a JSP page in utf-8 encoding, displaying some Japanese stuff. All is good.
2) I include this page in another JSP page, also utf-8 encoding, using 
<webwork:include ... /> and I get garbage.
3) I include this page using <jsp:include ...></jsp:include>, and I get the Japanese 
characters displaying properly.

I should have investigated more when I found this out, except I just put in the quick 
fix and replaced all <webwork:include ... /> with <jsp:include ...></jsp:include>

I think IncludeTag class is causing me grief... really strong feeling... how can I fix 
it???

Thank you!

James


-----Original Message-----
From: James Pan 
Sent: October 30, 2003 10:32 AM
To: [EMAIL PROTECTED]
Subject: RE: Spam:[OS-webwork] Again: internationalization problems


That's a good point, though I'm not sure it applies here.

I looked at the IncludeTag class, and looks like it either looks for 
webwork.i18n.encoding, or it looks for the file's encoding. The template files are 
utf-8 encoded, so they really should result to the same thing, no?

Anyways I tried it, and while I got garbage characters before, I now get a bunch of 
question marks, like ??? ????? ?????. Does this sound familiar to you?

Thanks again!

James

-----Original Message-----
From: Dick Zetterberg [mailto:[EMAIL PROTECTED]
Sent: October 30, 2003 10:10 AM
To: [EMAIL PROTECTED]
Subject: Re: Spam:[OS-webwork] Again: internationalization problems


Perhaps it is the include for the ui templates that uses the wrong character encoding 
and therefore your ui tags are messed up?
I don't know WW2, but I assume now that it is working the same way as in WW1.3:
The UI tags call a static include method that resides in the IncludeTag class in order 
to include the JSP template for the ui tag. This method in the IncludeTag looks for 
the property webwork.i18n.encoding which it uses when writing the result to the 
servlet response.
If the encoding is not set correctly then perhaps you could get the problems you are 
describing?

Best regards,

Dick Zetterberg
[EMAIL PROTECTED]


----- Original Message ----- 
From: "James Pan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 3:48 PM
Subject: RE: Spam:[OS-webwork] Again: internationalization problems


> I don't think so, though I'm not 100% sure.
> 
> I changed the encoding of the JSPs and template JSPs to UTF-8 (manually saving the 
> files in UTF-8 format), which is why the Japanese show up directly in my JSPs. 
> However, I'm inclined to think that the taglib is what's messing with the encoding, 
> because after all, only the <ui:xxx /> tags mess up (and this is from adding a line 
> <webwork:text name="'main.title'" /> in both controlheader.jsp *and* text.jsp in 
> /template/xhtml...
> 
> Help please!! The end of the project is so close I can smell it, I just need to 
> solve this last problem! Thank you!!
> 
> James
> 



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to