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

None latin character attachment names get corrupted when downloaded as "download all", using Windows

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      If a Confluence page has file attachments with Japanese file names and you click on them one-by-one, they get downloaded to the local disk and the Japanese file name is preserved (except that spaces " " get replaced by a "+" see CONF-4503). However, if you click on "download all", the file names of the downloaded files are corrupted on the local disk. Please see screenshots attached. I was able to replicate this problem on Windows using IE browser (worked fine on Mac Safari). I think this could be an issue for many of our Japanese customers.

        1. 7z453.msi
          891 kB
        2. download-all.JPG
          download-all.JPG
          115 kB
        3. download-all-2.JPG
          download-all-2.JPG
          32 kB
        4. download-all-3.JPG
          download-all-3.JPG
          58 kB
        5. encoding-test-result.JPG
          encoding-test-result.JPG
          163 kB

            [CONFSERVER-6399] None latin character attachment names get corrupted when downloaded as "download all", using Windows

            Ngoc Dao (Inactive) added a comment - - edited

            ZipOutputStream supports charset "to be used to encode the entry names and comments":
            https://docs.oracle.com/javase/8/docs/api/index.html?java/util/zip/ZipOutputStream.html

            So, the solution for this problem can be like this:

            • Detect browser agent, to see what OS and language the user are using.
            • If they are Windows and Japanese, pass Charset.forName("Shift-JIS") to ZipOutputStream.
            • Otherwise, use UTF8.

            Sample code:
            https://qiita.com/uskey512/items/e4e352754a92f0f776fa

            Ngoc Dao (Inactive) added a comment - - edited ZipOutputStream supports charset "to be used to encode the entry names and comments": https://docs.oracle.com/javase/8/docs/api/index.html?java/util/zip/ZipOutputStream.html So, the solution for this problem can be like this: Detect browser agent, to see what OS and language the user are using. If they are Windows and Japanese, pass Charset.forName("Shift-JIS") to ZipOutputStream. Otherwise, use UTF8. Sample code: https://qiita.com/uskey512/items/e4e352754a92f0f776fa

            6.13.0 still have this problem

            Andrey Ozerov added a comment - 6.13.0 still have this problem

            jxs0112 added a comment -

            not only in Windows,Chrome in mac pro also has this problem.(Confluence 5.6.4)

            jxs0112 added a comment - not only in Windows,Chrome in mac pro also has this problem.(Confluence 5.6.4)

            I was able to replicate this using Windows, on both Chrome and IE11. I was not able to replicate this using Linux.

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - I was able to replicate this using Windows, on both Chrome and IE11. I was not able to replicate this using Linux.

            Hi There

            This issue is currently on our backlog but is unlikely to be addressed in the immediate future.

            Regards
            Steve Haffenden
            Confluence Bugmaster
            Atlassian

            Steve Haffenden (Inactive) added a comment - Hi There This issue is currently on our backlog but is unlikely to be addressed in the immediate future. Regards Steve Haffenden Confluence Bugmaster Atlassian

            We can see same problem in Confluence 5.x and 4.x.

            Any progress on this?

            G2G JPSupport added a comment - We can see same problem in Confluence 5.x and 4.x. Any progress on this?

            Hi,

            I have the same problem with filenames in Russian. I installed Confluence 3.2.

            Boris Smirnov added a comment - Hi, I have the same problem with filenames in Russian. I installed Confluence 3.2.

            Hi,

            As mentioned in CSP-36527, a solution within Confluence should be found to have a better approach for user side.
            Thanks in advance for your action on this.

            Regards,
            Alexandre

            Alexandre JOUANDEAU-IMOTO added a comment - Hi, As mentioned in CSP-36527, a solution within Confluence should be found to have a better approach for user side. Thanks in advance for your action on this. Regards, Alexandre

            Luke Yang added a comment -

            Hi, Guys

            With 7-Zip (attached), we can extract the Korean filename-file.
            But it is decoded into UTF-8 character filename.
            I thinks it's better than above in some place.

            7-Zip is open source program, so it's free.

            Cheers.

            Luke

            Luke Yang added a comment - Hi, Guys With 7-Zip (attached), we can extract the Korean filename-file. But it is decoded into UTF-8 character filename. I thinks it's better than above in some place. 7-Zip is open source program , so it's free. Cheers. Luke

            Luke Yang added a comment -

            Hi, guys

            This is Luke from Goldpitcher, Korean partner company.
            We got the same issue from our customer.

            So, we suggested below way, refer to it.

            1. Install JDK and add bin directory path to system path.
            2. move to downloaded folder.
            3. run the below command in dos prompt mode. (assume downloaded filename is download_xxx.zip)

            > jar xvf download_xxx.zip
            

            If you guys happen to know the other way, please let me know.

            Cheers,

            Luke

            Luke Yang added a comment - Hi, guys This is Luke from Goldpitcher, Korean partner company. We got the same issue from our customer. So, we suggested below way, refer to it. 1. Install JDK and add bin directory path to system path. 2. move to downloaded folder. 3. run the below command in dos prompt mode. (assume downloaded filename is download_xxx.zip) > jar xvf download_xxx.zip If you guys happen to know the other way, please let me know. Cheers, Luke

              Unassigned Unassigned
              jhanji@imahima.com Neeraj Jhanji
              Affected customers:
              41 This affects my team
              Watchers:
              41 Start watching this issue

                Created:
                Updated: