Re: Charset (Struts and Velocity)

2005-02-14 Thread Shinobu Kawai
Hi Nathan, the VelocityViewServlet (largely in the interest of compatibility with VelocityServlet) does take the output.encoding property into account, but only if there is no charset specified within the default.contentType property. Didn't know that. Maybe it needs to get it

Re: Charset (Struts and Velocity)

2005-02-14 Thread Shinobu Kawai
Hi Markos, It's all Java stuff. Java stores data in memory as Unicode, so everything going into Java must be converted into Unicode. Currently, there is no way Java can tell whether a file is ascii or Greek or Japanese or whatever. So, you have to Unicode escape the files.

Re: Charset (Struts and Velocity)

2005-02-14 Thread Nathan Bubna
On Mon, 14 Feb 2005 01:01:23 -0800, Shinobu Kawai [EMAIL PROTECTED] wrote: Hi Nathan, the VelocityViewServlet (largely in the interest of compatibility with VelocityServlet) does take the output.encoding property into account, but only if there is no charset specified within the

Re: Charset (Struts and Velocity)

2005-02-14 Thread Shinobu Kawai
Hi Nathan, no, i don't think it's documented anywhere. any good idea for where such a note should go? I would definitely want one in the VVS javadoc and/or view tool top page. wanna make a patch? :) I'll file a bugzilla issue for you. ;) ## I'll make the patch if I have some

Re: Charset (Struts and Velocity)

2005-02-11 Thread Markos Charatzas
On Friday 11 February 2005 07:21, Shinobu Kawai wrote: resource files and charset might be your problem. Do you mean your resource files have non-ascii characters in it? If so, that's your problem. They must be escaped java-wise like \u1234. cf.

Re: Charset (Struts and Velocity)

2005-02-11 Thread Markos Charatzas
Just to point out that the data stored in the DB is using cp-1253 :/ So far I didnt have to deal with ResourceBundles so all text was inside the HTML templates. I cant seem to understand why setting the output encoding in velocity.properties to ISO-8859-7 would cause the data coming from the

Re: Charset (Struts and Velocity)

2005-02-11 Thread Markos Charatzas
On Friday 11 February 2005 07:21, Shinobu Kawai wrote: They must be escaped java-wise like \u1234. Shinobu I did that and it worked. Thanks. Although I find it a bit hard to accept that any resource bundle must be in that format. That makes life a bit harder :/ Still I cannot understand why

Re: Charset (Struts and Velocity)

2005-02-11 Thread Shinobu Kawai
Hi Markos, They must be escaped java-wise like \u1234. Shinobu I did that and it worked. Thanks. Welcome. :) Although I find it a bit hard to accept that any resource bundle must be in that format. That makes life a bit harder :/ It's all Java stuff. Java stores data in memory as

Re: Charset (Struts and Velocity)

2005-02-11 Thread Markos Charatzas
On Friday 11 February 2005 17:45, Shinobu Kawai wrote: It's all Java stuff. Java stores data in memory as Unicode, so everything going into Java must be converted into Unicode. Currently, there is no way Java can tell whether a file is ascii or Greek or Japanese or whatever. So, you have to

Re: Charset (Struts and Velocity)

2005-02-11 Thread mailmur
On Friday 11 February 2005 17:45, Shinobu Kawai wrote: It's all Java stuff. Java stores data in memory as Unicode, so everything going into Java must be converted into Unicode. Currently, there is no way Java can tell whether a file is ascii or Greek or Japanese or whatever. So,

Re: Charset (Struts and Velocity)

2005-02-11 Thread Nathan Bubna
On Fri, 11 Feb 2005 07:45:19 -0800, Shinobu Kawai [EMAIL PROTECTED] wrote: ... Still I cannot understand why setting the output.encoding to ISO-8859-7 in velocity.properties has that effect I mentioned earlier. Even more since you pointed out that the output.encoding doesn't matter

Re: Charset (Struts and Velocity)

2005-02-11 Thread Shinobu Kawai
Hi Nathan, Still I cannot understand why setting the output.encoding to ISO-8859-7 in velocity.properties has that effect I mentioned earlier. Even more since you pointed out that the output.encoding doesn't matter unless you're using VelocityServlet or Anakia and Im using

Re: Charset (Struts and Velocity)

2005-02-11 Thread Nathan Bubna
On Fri, 11 Feb 2005 13:59:38 -0800, Shinobu Kawai [EMAIL PROTECTED] wrote: Hi Nathan, Still I cannot understand why setting the output.encoding to ISO-8859-7 in velocity.properties has that effect I mentioned earlier. Even more since you pointed out that the output.encoding

Re: Charset (Struts and Velocity)

2005-02-10 Thread Markos Charatzas
Hi Shinobu, #* Actually, the output.encoding doesn't matter unless you're using VelocityServlet or Anakia. ;) Yeap you are right...it must have been there since we migrated to VelocityViewServlet :) Please refresh my memory. Was there a way to specify content type in resource files? I

Re: Charset (Struts and Velocity)

2005-02-10 Thread Nathan Bubna
disclaimeri've only halfheartedly read this thread and personally never use non-default charsets/disclaimer have you tried setting the default.contentType property that the VVS looks for? e.g. default.contentType=text/html; charset=ISO-8859-1 i'm half-doubting that's the problem, but it

Re: Charset (Struts and Velocity)

2005-02-10 Thread Shinobu Kawai
Hi Markos, Please refresh my memory. Was there a way to specify content type in resource files? I thought they were just PropertyResourceBundle files. I meant charset, thanks for pointing that out. Question marks usually means that the charset converter couldn't find the suitable

Re: Charset (Struts and Velocity)

2005-02-09 Thread Shinobu Kawai
Hi Markos, Although, 1. I have defined the charset in struts-config.xml like the following controller contentType=text/html; charset=ISO-8859-7/ 2. In velocity properties I have set both input.encoding=ISO-8859-7 output.encoding=ISO-8859-7 #* Actually, the output.encoding doesn't matter