[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 wrote: > Thanks to Google guys, FreeMarker is now run fine. However, there is > still a (small/big/?) problem with Unicode. > I have

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

2010-05-16 Thread Phuong Nguyen
Hi Don: Thanks for the reply. I find the header on the cloud is a little bit *weird* For Local Server Response Headers Content-Languageen-US Content-Typetext/html; charset=utf-8 Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre- check=0 Pragma no-cache Expires Su

[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 out),

[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 que

[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.

[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 wrote: > Have you tried saving your template files in UTF-8? > You can use Notepad++ for this. > > -- > You re

[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 wrote: > Freemarker has a way to specify the encoding of the files that you're > dealing with. Look at freemarker.template.Configuration, more > specifically : > >         fmConfi

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 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 Nguyen wrote: > >

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.setContentTypeto change the charset for the response. Maybe FreeMarker has a facility somewhere to set that, or maybe you need to do i

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 th