Uploaded image for project: 'Content Translation Extended (CTX)'
  1. Content Translation Extended (CTX)
  2. EXCONTRANS-381

ATLanguages plugin problem translating accents

XMLWordPrintable

    • Icon: Support Request Support Request
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 3.4.6
    • 3.4.5
    • None
    • None

      Using the ATLanguages plugin seems to be a problem when the text includes some accents. The text is correctly translated ad encoded in base64, but when the text encoded in base64 is transformed to UTF-8, the content shows strange symbols.

      This issue is happening because the decoding is shown in ISO-8859-1.

      Some findings the customer shared:

      These are the class where the base64 change is performed:

      info.magnolia.translation.ext.atls.translator.AtlsSynchronousTranslator.
      info.magnolia.translation.ext.atls.translator.AtlsAsynchronousTranslator

      The exact line:

      String decodedBase64 = new String(Base64.getDecoder().decode(base64.getBytes()));

      A posible solution:

      String decodedBase64 = new String(Base64.getDecoder().decode(text), StandardCharsets.UTF_8);

            yen.lactue Yen Lac Tue
            ccantalapiedra Carlos Cantalapiedra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 0.25d
                0.25d