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

Encoding issue for the JIRA macro link beside the page title when using Russian language

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 6.5.0, 6.6.0
    • Macros - Jira Macros

      Description

      When the user added more than 1 JIRA ticket in a Confluence page and using the Russian language, the JIRA link macro beside the page title will display some special characters and not able to render it correctly.

      PS: Tested on confluence 6.4 and the bug is not affected the previous version.

      Steps to reproduce

      1. Create an application link from Confluence to JIRA.
      2. Create a Confluence page
      3. Add 2 JIRA ticket in the confluence page

      Expected Result
      The character is rendered correctly.

      Actual Result

      Recording #37.mp4

        1. confluence-language-pack-ru_RU-6.6.0.m28-v2r93416-2017-11-28.jar
          665 kB
        2. Recording #37.mp4
          3.81 MB
        3. screenshot-1.png
          screenshot-1.png
          43 kB
        4. screenshot-2.png
          screenshot-2.png
          5 kB
        5. Screen Shot 2018-03-14 at 00.37.45.png
          Screen Shot 2018-03-14 at 00.37.45.png
          8 kB
        6. Screen Shot 2018-03-14 at 00.37.45.png.html
          0.2 kB
        7. screenshot-3.png
          screenshot-3.png
          28 kB

            [CONFSERVER-54145] Encoding issue for the JIRA macro link beside the page title when using Russian language

            As I've mentioned, there are some other incorrectly encoded translations. You need to unpack the language jar-file, find the file with the i18n-key you need to update and replace the translations with the correct ones.

            There is a guide who to repack the bundled libraries:

            https://confluence.atlassian.com/confkb/how-to-edit-files-in-confluence-jar-files-103711179.html

             

            Dmitriy Zavernyaev added a comment - As I've mentioned, there are some other incorrectly encoded translations. You need to unpack the language jar-file, find the file with the i18n-key you need to update and replace the translations with the correct ones. There is a guide who to repack the bundled libraries: https://confluence.atlassian.com/confkb/how-to-edit-files-in-confluence-jar-files-103711179.html  

            aozerov2002378919 added a comment -

            Dmitriy, we need yours help again. Yours solution working only for "screensot-1.png". "screensot-2.png" and "screensot-3.png" still have problems.

            aozerov2002378919 added a comment - Dmitriy, we need yours help again. Yours solution working only for "screensot-1.png". "screensot-2.png" and "screensot-3.png" still have problems.

            Thank you guys for the providing the workaround solution!

            Gonchik Tsymzhitov added a comment - Thank you guys for the providing the workaround solution!

            Andrey, I've attached my file (confluence-language-pack-ru_RU-6.6.0.m28-v2r93416-2017-11-28.jar), it is for confluence 6.6.0.

            I am not sure, if it'll work correctly for other confluence versions. If it's your version, you can replace the same file in subdirectory confluence/WEB-INF/atlassian-bundled-plugins in the application directory (I've also replaced the same file in confluence/WEB-INF/atlassian-bundled-plugins-setup directory but I'm not sure that it is necessary).

            If you want to modify your file, you should unpack jar and edit the i18n-key I have mentioned above in this file:

            com/atlassian/confluence/plugins/metadata/jira/i18n_ru_RU.properties 

             

            As I've noticed, the following problem is not the only incorrectly encoded translation, there are many of them on other pages/menu/etc

             

            Dmitriy Zavernyaev added a comment - Andrey, I've attached my file (confluence-language-pack-ru_RU-6.6.0.m28-v2r93416-2017-11-28.jar), it is for confluence 6.6.0. I am not sure, if it'll work correctly for other confluence versions. If it's your version, you can replace the same file in subdirectory confluence/WEB-INF/atlassian-bundled-plugins in the application directory (I've also replaced the same file in confluence/WEB-INF/atlassian-bundled-plugins-setup directory but I'm not sure that it is necessary). If you want to modify your file, you should unpack jar and edit the i18n-key I have mentioned above in this file: com/atlassian/confluence/plugins/metadata/jira/i18n_ru_RU.properties   As I've noticed, the following problem is not the only incorrectly encoded translation, there are many of them on other pages/menu/etc  

            aozerov2002378919 added a comment - - edited

            Dmitriy, add fixed jar to thise issue, please.
            And write full path, where we need to change thise jar.
            Thank you!

            aozerov2002378919 added a comment - - edited Dmitriy, add fixed jar to thise issue, please. And write full path, where we need to change thise jar. Thank you!

            I have found the exact unicode-escaped sequence in language JAR (confluence-language-pack-ru_RU-6.6.0.m28-v2r93416-2017-11-28.zip in my case) for this i18n-key:

            content.metadata.jira.items=\u00D0\u00A1\u00D1\u0081\u00D1\u008B\u00D0\u00BB\u00D0\u00BE\u00D0\u00BA JIRA\:{0} 
            
            >>> print u'\u00D0\u00A1\u00D1\u0081\u00D1\u008B\u00D0\u00BB\u00D0\u00BE\u00D0\u00BA'
            С��лок

            I've changed this line, repacked the JAR, replaced it in atlassian-bundled-plugins and atlassian-bundled-plugins-setup, restarted the application, and it worked!

             

            PS Don't forget to Ctrl+F5 the page if you don't see the changes.

            Dmitriy Zavernyaev added a comment - I have found the exact unicode-escaped sequence in language JAR (confluence-language-pack-ru_RU-6.6.0.m28-v2r93416-2017-11-28.zip in my case) for this i18n-key: content.metadata.jira.items=\u00D0\u00A1\u00D1\u0081\u00D1\u008B\u00D0\u00BB\u00D0\u00BE\u00D0\u00BA JIRA\:{0} >>> print u '\u00D0\u00A1\u00D1\u0081\u00D1\u008B\u00D0\u00BB\u00D0\u00BE\u00D0\u00BA' СÑ�Ñ�лок I've changed this line, repacked the JAR, replaced it in atlassian-bundled-plugins and atlassian-bundled-plugins-setup, restarted the application, and it worked!   PS Don't forget to Ctrl+F5 the page if you don't see the changes.

            Gonchik Tsymzhitov added a comment - - edited

            Hi!
            it is also related for the 6.6.3

            I have tried to set parameters in this time it is not supported.

            Could you update the Jira issue, (I mean the affected version field)?

            Cheers,
            Gonchik Tsymzhitov

            Gonchik Tsymzhitov added a comment - - edited Hi! it is also related for the 6.6.3 I have tried to set parameters in this time it is not supported. Could you update the Jira issue, (I mean the affected version field)? Cheers, Gonchik Tsymzhitov

            aozerov2002378919 added a comment - - edited

            And after used paramert:

            CATALINA_OPTS="-Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Dencoding=UTF-8 ${CATALINA_OPTS}"

            We still have problem in 6.6.0 with encoding.
            (Screen-2 and 3)

            aozerov2002378919 added a comment - - edited And after used paramert: CATALINA_OPTS="-Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Dencoding=UTF-8 ${CATALINA_OPTS}" We still have problem in 6.6.0 with encoding. (Screen-2 and 3)

            We too  6.6.0

            Заборов Михаил added a comment - We too  6.6.0

            We are having the same issue in Confluence 6.6.0 with Russian translation

            Dmitriy Zavernyaev added a comment - We are having the same issue in Confluence 6.6.0 with Russian translation

              Unassigned Unassigned
              lng@atlassian.com Lipkent Ng
              Affected customers:
              16 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated: