Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Localization] : Special chars are not being migrated correctly #30694

Open
jcastro-dotcms opened this issue Nov 18, 2024 · 3 comments
Open

[Localization] : Special chars are not being migrated correctly #30694

jcastro-dotcms opened this issue Nov 18, 2024 · 3 comments

Comments

@jcastro-dotcms
Copy link
Contributor

jcastro-dotcms commented Nov 18, 2024

Parent Issue

Problem Statement

Some special characters in legacy Language Variables are not being migrated correctly.

Steps to Reproduce

In a local development environment:

  • Start up dotCMS with the Full Starter.
  • Go to the location of the Spanish language properties file in the /assets/ folder: assets/messages/cms_language_es.properties
  • Delete all of its contents, and add a single entry:
something.here=Presentación de Productos
  • Run the Upgrade Task that migrates legacy Language Variables via Postman, or use CURL:
curl --location 'http://localhost:8080/api/v1/upgradetask' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
    "upgradeTaskClass": "com.dotmarketing.startup.runonce.Task240306MigrateLegacyLanguageVariables"
}'
  • Go to the Schema > Language Variables portlet, and filter for entries in Spanish.
  • You'll see that the special character -- in this case, the ó -- was not migrated correctly:
Screenshot 2024-11-18 at 3 28 31 PM

Acceptance Criteria

Special characters must be migrated without problem.

dotCMS Version

As of dotCMS 24.08.

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

If necessary, you can go ahead and manually fix the imported legacy Language Variables.

Sub-Tasks & Estimates

No response

@jcastro-dotcms jcastro-dotcms moved this from New to Next 1-3 Sprints in dotCMS - Product Planning Nov 18, 2024
@erickgonzalez erickgonzalez added the OKR : Customer Support Owned by Scott label Nov 18, 2024
@jcastro-dotcms jcastro-dotcms moved this from Next 1-3 Sprints to Current Sprint Backlog in dotCMS - Product Planning Dec 5, 2024
@jcastro-dotcms jcastro-dotcms self-assigned this Dec 5, 2024
@jcastro-dotcms jcastro-dotcms moved this from Current Sprint Backlog to In Progress in dotCMS - Product Planning Dec 5, 2024
@dsilvam dsilvam moved this from In Progress to Current Sprint Backlog in dotCMS - Product Planning Dec 11, 2024
@jdotcms jdotcms self-assigned this Dec 12, 2024
@jdotcms jdotcms moved this from Current Sprint Backlog to In Progress in dotCMS - Product Planning Dec 12, 2024
@jdotcms
Copy link
Contributor

jdotcms commented Dec 16, 2024

Hi @jcastro-dotcms
I have ran the steps and wasnt able to reproduce it
Screenshot 2024-12-15 at 10 25 29 PM

@jdotcms
Copy link
Contributor

jdotcms commented Dec 16, 2024

I have also created this test:

@Test
    public void test_encoding_iso_and_utf8() throws URISyntaxException, IOException {
        // Test code here
        final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        final URL initFileURL = classLoader.getResource("messages/cms_language_es.properties");
        final List<String> lines = Files.readAllLines(Path.of(initFileURL.toURI()), StandardCharsets.ISO_8859_1);
        Assert.assertNotNull(lines);
        Assert.assertTrue(lines.size() > 0);
        final String line = lines.get(0);
        Assert.assertEquals("something.here=Presentación de Productos", line);
    }

And it is passing ok

Copy link

github-actions bot commented Dec 16, 2024

jdotcms added a commit that referenced this issue Dec 16, 2024
@jdotcms jdotcms moved this from In Progress to In Review in dotCMS - Product Planning Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Review
Development

No branches or pull requests

3 participants