dev@glassfish.java.net

Re: [forum question] Glassfish/SJSAS 9 PE support Chinese characters in paths?

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Thu, 20 Jul 2006 14:37:57 -0500

Hi.

I worked on an issue similar to this that caused problems when the
Windows temporary path contained a multi-byte character. Before the
fix, this caused deployments to fail.

I cannot speak about multibyte characters in the installation path or
JSP pages. The problem I solved with the temp file and the upload
problem had to do with a URL being used to create a file path. The
java.net.URL class does not encode multi-byte characters as we are
accustomed to seeing them in URLs in browsers, web page links, etc.

One way to resolve problems like this is to use url.toURI().toURL() in
the code where a URL with proper encoding is needed. Of course, in some
cases the code might already have a File object which has a toURI()
method.

It certainly seems possible that other places in the code might have a
similar issue.

If we could see the relevant part of the server.log file that might help.

- Tim

Cheng Fang wrote:
>
> http://gceclub.sun.com.cn/NASApp/sme/jive/thread.jsp?forum=10&thread=39115
>
>
> This user is asking, "does SJSAS PE 9 support Chinese characters in
> paths?" He/she names the folder that contains JSP pages using Chinese
> characters, and found JSP pages can't display.
>
> So there seems to be 2 questions:
>
> 1) Can I use non-latin characters in Glassfish installation directory?
> 2) Can I use non-latin characters to name directories inside
> WAR/EAR/EJB-JAR? like war-root/好看/index.jsp?
>
> Thanks,
>