[EXCONTRANS-381] ATLanguages plugin problem translating accents Created: 19/Sep/22  Updated: 11/Nov/22  Resolved: 11/Nov/22

Status: Resolved
Project: Content Translation Extended (CTX)
Component/s: None
Affects Version/s: 3.4.5
Fix Version/s: 3.4.6

Type: Support Request Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Yen Lac Tue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 0.25d
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Template:

 Description   

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);


Generated at Mon Feb 12 00:30:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.