From 6f25165b16f7de35036ab6bfecd1a644744e545c Mon Sep 17 00:00:00 2001 From: jdotcms Date: Mon, 16 Dec 2024 13:09:10 -0600 Subject: [PATCH] #30694 switching to UTF to see if test runs ok --- .../business/LegacyLangVarMigrationHelper.java | 2 +- .../business/LegacyLangVarMigrationHelperTest.java | 4 ++++ dotCMS/src/test/resources/messages/cms_language_es.properties | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 dotCMS/src/test/java/com/dotcms/languagevariable/business/LegacyLangVarMigrationHelperTest.java create mode 100644 dotCMS/src/test/resources/messages/cms_language_es.properties diff --git a/dotCMS/src/main/java/com/dotcms/languagevariable/business/LegacyLangVarMigrationHelper.java b/dotCMS/src/main/java/com/dotcms/languagevariable/business/LegacyLangVarMigrationHelper.java index ccc69261cd43..854029f2a656 100644 --- a/dotCMS/src/main/java/com/dotcms/languagevariable/business/LegacyLangVarMigrationHelper.java +++ b/dotCMS/src/main/java/com/dotcms/languagevariable/business/LegacyLangVarMigrationHelper.java @@ -184,7 +184,7 @@ Optional localeFromTag(final String cmsLanguage) { */ private void migrateFileContents(final Path path, final Language language, final List success, final List fails) throws IOException { Logger.info(this,String.format("-> Migrating variables for language: %s_%s", language.getLanguageCode(), language.getCountryCode())); - final List lines = Try.of(() -> Files.readAllLines(path, StandardCharsets.ISO_8859_1)) + final List lines = Try.of(() -> Files.readAllLines(path, StandardCharsets.UTF_8)) // changing from StandardCharsets.ISO_8859_1 to UTF-8 .getOrElseThrow(e -> new IOException(String.format("Could not read file: %s", path), e)); if (lines.isEmpty()) { Logger.warn(this,String.format("File '%s' is empty. Moving on...", path)); diff --git a/dotCMS/src/test/java/com/dotcms/languagevariable/business/LegacyLangVarMigrationHelperTest.java b/dotCMS/src/test/java/com/dotcms/languagevariable/business/LegacyLangVarMigrationHelperTest.java new file mode 100644 index 000000000000..8b2b948706d9 --- /dev/null +++ b/dotCMS/src/test/java/com/dotcms/languagevariable/business/LegacyLangVarMigrationHelperTest.java @@ -0,0 +1,4 @@ +package com.dotcms.languagevariable.business; + +public class LegacyLangVarMigrationHelperTest { +} diff --git a/dotCMS/src/test/resources/messages/cms_language_es.properties b/dotCMS/src/test/resources/messages/cms_language_es.properties new file mode 100644 index 000000000000..7851e6a2fee1 --- /dev/null +++ b/dotCMS/src/test/resources/messages/cms_language_es.properties @@ -0,0 +1 @@ +something.here=Presentación de Productos