Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding problems with special characters like 'ñ' or 'á' #37

Closed
jorgeoa opened this issue Nov 17, 2010 · 4 comments
Closed

Encoding problems with special characters like 'ñ' or 'á' #37

jorgeoa opened this issue Nov 17, 2010 · 4 comments

Comments

@jorgeoa
Copy link

jorgeoa commented Nov 17, 2010

Hi.

The Filemanager interface has some problems when the text has, for example, spanish characters like 'ñ' or accented vowels (á,é,í,ó,ú).

I'm having these problems:

  • The language strings in the es.js file are shown with encoding erors in interface. For example, the authentication failed text is shown: "No estás autorizado para usar el administrador de archivos.", but would be "No estás autorizado para usar el administrador de archivos.
  • When I try to create a new folder with special chars, like "España", the folder is created in the server with the name "España", and the interface shows it with the same wrong format.
  • If I have a folder in the server with a special chars name (España again), it is shown well formatted in the main frame, but with encoding errors in the FileTree (Espa�a)
  • If I click on the folder in the main frame (the well formed one), I get the "Folder not found error"). I attach a screenshot of the error with the Firebug log

  • If I click on the FileTree folder, I get the sale "Folder not found error" but in the case, as the filetree shows the folder with encoding problems, the request and response of the server is quite differente. A scrrenshot...

As you can see, the request to the jqueryFileTree.jsp file returns a 500 server error. Here is the server exception:

java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "uF" at java.net.URLDecoder.decode(Unknown Source) at org.apache.jsp.ckeditor.filemanager.scripts.jquery_filetree.connectors.jqueryFileTree_jsp._jspService(jqueryFileTree_jsp.java:104) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Unknown Source)

I'm trying to solve the problems but I'm having no success.

I realized that the Filemanager interface uses UTF-8 as charset, but the files are saved in ANSI format, that can generate problems (If you save a file (HTML for example) with special chars in ANSI, and later you open it in UTF-8, the special chars will be rendered with errors).

My system is a Windows XP OS with Apache Tomcat 6.0.20

I hope you can solve these problems. I'll continue with my test in order to find a solution.

Regards.

PD: I apologize if my explanations aren't so good, I haven't a high english level.

@simogeo
Copy link
Owner

simogeo commented Nov 17, 2010

Working with PHP, Ok for all points except 3 of them :

The language strings in the es.js file are shown with encoding erors in interface. For example, the authentication failed text is shown: "No estás autorizado para usar el administrador de archivos.", but would be "No estás autorizado para usar el administrador de archivos.

This is not true for me. Maybe you should precise UTF-8 encoding to Tomcat.

When I try to create a new folder with special chars, like "España", the folder is created in the server with the name "España", and the interface shows it with the same wrong format.

* It is created as "España" on my computer (runing ubuntu)*

If I click on the folder in the main frame (the well formed one), I get the "Folder not found error"). I attach a screenshot of the error with the Firebug log

This is not true for me. The source of your problem should be similar to the first point

Maybe you should have a look on that page : http://www.jspwiki.org/wiki/TomcatAndUTF8 and maybe Trickydicky will tell us more about that.

Anyway, thanks for reporting these issues!

another encoding issue ticket has been opened : https://github.com/simogeo/Filemanager/issues#issue/32

@simogeo
Copy link
Owner

simogeo commented Nov 17, 2010

It works now for PHP connector (including in the filetree)

@jorgeoa
Copy link
Author

jorgeoa commented Nov 17, 2010

Hi simogeo.

I'm testing it on another computer with OSX and PHP and all works fine.

Tomorrow I'll test it again in the tomcat computer, looking at the tomcat encoding configuration.

Regards.

@jorgeoa
Copy link
Author

jorgeoa commented Nov 18, 2010

As simogeo said, forcing the URIEncoding to UTF-8 in the server.xml file, the main frame works fine with special chars, but the JSP FileTree already has a problem:

If I have a folder in the server with a special chars name (España again), it is shown well formatted in the main frame, but with encoding errors in the FileTree (Espa�a)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants