Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-4460

Bug when uploading attachment .txt with special characters in filename

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • 1.4.1
    • None
    • JBoss 3.2.5

      When uploading a file Übersicht.txt there comes up an error message.

      When uploading a file Übersich.doc the upload is done.

        1. concluence-bug.jpg
          59 kB
          Stefan Baader
        2. screenshot-1.jpg
          29 kB
          Stefan Baader
        3. screenshot-1.jpg
          142 kB
          Stefan Baader
        4. screenshot-1.jpg
          86 kB
          Stefan Baader

            [CONFSERVER-4460] Bug when uploading attachment .txt with special characters in filename

            YOU AND WE GOT IT!
            Due to your hints concerning url encoding and an information from your own server we finally found the solution.

            As we use JBoss application server with tomcat embedded we tried the following:

            http://confluence.atlassian.com/display/DOC/Configuring+Tomcat%27s+URI+encoding

            Configuring Tomcat's URI encoding

            By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs received from a browser. This can cause problems when Confluence's encoding is UTF-8, and you are using international characters in attachment or page names.

            In the conf/server.xml insert

            <Connector port="8080" URIEncoding="UTF-8"/>

            This means it is not enough to tell JBoss to use UTF-8. You have to tell it tomcat inside also.

            I propose that you publish your information concerning JBoss/tomcat bundle on a higher level.

            Thank you guys.

            Cheers,

            Stefan

            Stefan Baader added a comment - YOU AND WE GOT IT! Due to your hints concerning url encoding and an information from your own server we finally found the solution. As we use JBoss application server with tomcat embedded we tried the following: http://confluence.atlassian.com/display/DOC/Configuring+Tomcat%27s+URI+encoding Configuring Tomcat's URI encoding By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs received from a browser. This can cause problems when Confluence's encoding is UTF-8, and you are using international characters in attachment or page names. In the conf/server.xml insert <Connector port= "8080" URIEncoding= "UTF-8" /> This means it is not enough to tell JBoss to use UTF-8. You have to tell it tomcat inside also. I propose that you publish your information concerning JBoss/tomcat bundle on a higher level. Thank you guys. Cheers, Stefan

            Hi Stefan,

            Since we now have two open tickets for essentially the same problem, I will close this one as a duplicate and move some of the screenshots over to the other issue.

            Please add all future comments to CONF-4503.

            Regards,
            -Daniel

            Daniel Ostermeier added a comment - Hi Stefan, Since we now have two open tickets for essentially the same problem, I will close this one as a duplicate and move some of the screenshots over to the other issue. Please add all future comments to CONF-4503 . Regards, -Daniel

            I found the folder for attachments in the data/confluence/.. folder of JBoss.
            So, the filename of the attachment is indeed strange. See my screenshot

            Stefan Baader added a comment - I found the folder for attachments in the data/confluence/.. folder of JBoss. So, the filename of the attachment is indeed strange. See my screenshot

            Stefan Baader added a comment - My add on issue: http://jira.atlassian.com/browse/CONF-4503

            I created another issue to this item because I thought it's more pointed to the problem an I was not sure to reactivate this issue:

            Using the character Ü in pages is no problem.
            The Encoding in the General Config is UTF-8.
            The attachment folder I can't find on the server. I pasted a screenshot of confluence.war

            Stefan Baader added a comment - I created another issue to this item because I thought it's more pointed to the problem an I was not sure to reactivate this issue: Using the character Ü in pages is no problem. The Encoding in the General Config is UTF-8. The attachment folder I can't find on the server. I pasted a screenshot of confluence.war

            This is clearly an encoding problem.

            I am wondering if there is a general encoding configuration problem with the installation? Are you able to use the 'Ü' successfully in Confluence pages and comments? If not, what encoding have you set Confluence to use? You can check this via the "Administration Console | Configuration | General Configuration", the Encoding setting. and what encoding is your browser using?

            Can you also check what name is being used to store the attachment on the filesystem. The file will be located in CONFLUENCE_HOME/attacahments/<pageid>/<filename>/version. The quickest way to determine the pageid of a page is to edit the page with the attachments. The URL will show the page id.

            Regards,
            -Daniel

            Daniel Ostermeier added a comment - This is clearly an encoding problem. I am wondering if there is a general encoding configuration problem with the installation? Are you able to use the 'Ü' successfully in Confluence pages and comments? If not, what encoding have you set Confluence to use? You can check this via the "Administration Console | Configuration | General Configuration", the Encoding setting. and what encoding is your browser using? Can you also check what name is being used to store the attachment on the filesystem. The file will be located in CONFLUENCE_HOME/attacahments/<pageid>/<filename>/version. The quickest way to determine the pageid of a page is to edit the page with the attachments. The URL will show the page id. Regards, -Daniel

            Name of the attachment is strange when umlauts or special characters are used. We can't delete or edit them.

            Stefan Baader added a comment - Name of the attachment is strange when umlauts or special characters are used. We can't delete or edit them.

            Hi Daniel,

            indeed, both of these documents are without any content, just created on the desktop with "New/Textfile" and "New/Microsoft Word document".
            But anyway: the concrete example of this case was a file with 3.4 MB, called "Übersicht_HV-Fehler_V1.3.doc". If we upload this file, the file appears in the list of attachments, but we can't delete or open it. If we want to edit, we can see that the displayed name is "Übersicht_HV-Fehler_V1.3.doc". It seems to be a characterset problem.

            Regards
            Stefan

            Stefan Baader added a comment - Hi Daniel, indeed, both of these documents are without any content, just created on the desktop with "New/Textfile" and "New/Microsoft Word document". But anyway: the concrete example of this case was a file with 3.4 MB, called "Übersicht_HV-Fehler_V1.3.doc". If we upload this file, the file appears in the list of attachments, but we can't delete or open it. If we want to edit, we can see that the displayed name is "Übersicht_HV-Fehler_V1.3.doc". It seems to be a characterset problem. Regards Stefan

            Hi Stefan,

            Confluence will present that error to you if the file is empty. Is Übersich.doc an empty file?

            Regards,
            -Daniel

            Daniel Ostermeier added a comment - Hi Stefan, Confluence will present that error to you if the file is empty. Is Übersich.doc an empty file? Regards, -Daniel

              Unassigned Unassigned
              819c7e2b77f9 Stefan Baader
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: