[appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-17 Thread Phuong Nguyen
Thanks for pointing out. I'm using FreeMarkerServlet, so here what I did: I change the content type of FreemarkerServlet, add charset=utf-8 to it. Without the charset being set, the FreemarkerServlet would obtain such charset from some environment variable (which I didn't have time to figure

[appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-17 Thread Phuong Nguyen
Hmm, there was a funny thing: I got the content type set correctly right now. *But*, if the unicode character was dispatched from controller to the view, then it will be rendered appropriately. However, if the character was typed into the controller before, then it will be rendered into several

[appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-17 Thread Phuong Nguyen
Excuse me for the typos. Here what I intended to say: *But*, if the unicode character was dispatched from controller to the view, then it will be rendered appropriately. However, if the character was typed into the template file (.ftl) before, then it will be rendered into several question marks.

Re: [appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-17 Thread Pieter Coucke
Have you tried saving your template files in UTF-8? You can use Notepad++ for this. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from

[appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-17 Thread Phuong Nguyen
I use Eclipse, which default encoding for text file is set to UTF-8. By the way, it runs fine on client, problems only when being deployed to the cloud. On May 17, 5:41 pm, Pieter Coucke pieter.cou...@onthoo.com wrote: Have you tried saving your template files in UTF-8? You can use Notepad++

[appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-17 Thread akochnev
Freemarker has a way to specify the encoding of the files that you're dealing with. Look at freemarker.template.Configuration, more specifically : fmConfiguration.setDefaultEncoding(UTF-8); fmConfiguration.setLocale(Locale.US); fmConfiguration.clearEncodingMap(); You can

[appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-17 Thread Phuong Nguyen
Thank you, I add DefaultEncoding setting to FreeMarkerServlet and the problem is solved. On May 17, 6:50 pm, akochnev akoch...@gmail.com wrote: Freemarker has a way to specify the encoding of the files that you're dealing with. Look at freemarker.template.Configuration, more specifically :  

[appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-16 Thread Don Schwarz
We need more information to help with this. Did you compare the HTTP response headers between the DevAppServer and when deployed? On May 15, 9:29 pm, Phuong Nguyen phuongn...@gmail.com wrote: Thanks to Google guys, FreeMarker is now run fine. However, there is still a (small/big/?) problem

Re: [appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-16 Thread nicolas melendez
Hi, the Locale can't be changed in development, no? NM On Mon, May 17, 2010 at 12:58 AM, Don Schwarz schwa...@google.com wrote: We need more information to help with this. Did you compare the HTTP response headers between the DevAppServer and when deployed? On May 15, 9:29 pm, Phuong

Re: [appengine-java] Re: Freemarker and Unicode: On local: fine, on cloud: become question mark

2010-05-16 Thread Toby Reyelts
You need to make a call to HttpServletResponse.setContentTypehttp://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletResponse.html#setContentType(java.lang.String)to change the charset for the response. Maybe FreeMarker has a facility somewhere to set that, or maybe you need to do it