I just looked at appengine System properties (System.getProperty('file.encoding').
The file system encoding is set to ANSI_X3.4-1968. You might tinker with trying to change that? On Feb 6, 10:51 pm, Tony Yang <tonyyan...@gmail.com> wrote: > Dear Sir, > Thanks a lot but the problem is still there. > Attached more description below. > 1. input some files into directory /war/images/ , they're are file names of > "img01.jpg", img02.jpg" ..."中文img.jpg" > 2. Assign file directory in JSP file by code below. > File myFile = new File(images/); > String[] strFiles = myFile.list(); > 3. Print file name in the assigned directory by JSP code below > for(int i=0 ; i < strFiles.length ; i++){ > file_name = strFiles[i].toString(); > out.println(file_name); > } > 4. The file name with traditional Chinese characters(中文) cannot be printed > out but others are ok for printing. > 5. The mentioned problem only happened after deploying in GAE cloud but > didn't happen in local Eclipse development environment. > > Please help and thanks again. > > > > > > > > On Mon, Feb 6, 2012 at 5:05 PM, Nichole <nichole.k...@gmail.com> wrote: > > With GFS you should be able to use any character in the name of a file > > or directory except the null character, > > so you just need to form your string using the right encoding. > > > String fileName = new String(str, "UTF-8); or use Big5 for encoding? > > > And then make sure the jsp prints the character correctly by including > > the encoding in one of several > > ways. Here's one way: > > <%@ page language="java" contentType="text/html; UTF-8" > > pageEncoding="UTF-8" isELIgnored="false" %> > > > On Feb 3, 7:44 pm, Tony Yang <tonyyan...@gmail.com> wrote: > > > Dear Sir, > > > Would you help me the problem below. > > > Environment : Java and JSP > > > Action : retrieve filename from file with Complicated Chinese > > > characters. > > > Sample file : A1-中文.jpg > > > Response : > > > 1. OK for local Eclipse developing platform, the name of "中文" can be > > > retrieved. > > > 2. After deploying in GAE cloud, system sound having problem and skip > > > this file and no response. > > > > Written code in JSP file : > > > ---------- > > > path_string = objFiles[i].toString(); > > > index1 = path_string.lastIndexOf('-')+1; > > > index2 = path_string.indexOf('.'); > > > file_name = path_string.substring(index1, index2) > > > <%= file_name%> > > > --------- > > > ---thanks. > > > -- > > 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-java@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. -- 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-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.