• NON ASCII

    By Alexey Ivanov 1 decade ago

    Hi! 

    How i can upload file with non ascii character in name?

     

    • NON ASCII in server console..

      By Alexey Ivanov 1 decade ago

       

       HTTP JVM: error: java.io.CharConversionException: Not an ISO 8859-1 character: ?

      P.S. server on linux of course

      • uhm

        By F. Kranenburg 1 decade ago

        I can't produce a test case here. But I think it isn't possible. Is it possible to upload such an file using the standard upload control?

        I found a script that can test for NON-ASCII characters.

        http://stackoverflow.com/questions/7696460/how-to-check-file-name-for-non-ascii-characters-via-js

        • Resolve

          By Alexey Ivanov 1 decade ago

          Change in xpUpload:

          var out:javax.servlet.ServletOutputStream = response.getOutputStream();

          out.print(renamedFile.getAbsolutePath() + "#UPLOADEDFILE#" + serverFile.getAbsolutePath() );

          to

          response.setCharacterEncoding("UTF-8");

          var writer = response.getWriter(); 

          writer.write(renamedFile.getAbsolutePath() + "#UPLOADEDFILE#" + serverFile.getAbsolutePath() );

           

          • Thanks this is in the latest version now

            By F. Kranenburg 1 decade ago

            Thanks.

        • One more

          By Alexey Ivanov 1 decade ago

          When filetype is application/octet-stream and size great then 2Mb , i have error:

           CLFAD0229E: Security exception occurred servicing request

          com.ibm.xsp.FacesExceptionEx: com.ibm.xsp.FacesExceptionEx: com.ibm.xsp.http.fileupload.MultipartStream$MalformedStreamException: MultipartStream.StreamEndedUnexpectedly.Exception