Skip to content

Commit

Permalink
Override ANSI_X3... encoding with UTF-8 (bsc#1216689)
Browse files Browse the repository at this point in the history
  • Loading branch information
shundhammer committed Feb 13, 2024
1 parent 079c4ed commit a14be91
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions console/src/modules/Console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def main

# activate a language specific console font
#
# @param string language ISO code of language
# @return [String] encoding encoding for console i/o
# @param string language ISO code of language
# @return [String] encoding encoding for console i/o

def SelectFont(lang)
fqlanguage = Language.GetLocaleString(lang)
Expand Down Expand Up @@ -120,6 +120,12 @@ def SelectFont(lang)
end
end

if Encoding.console.start_with?("ANSI_")
# Don't fall back to ancient ANSI_X3.4-1968 (bsc#1216689)
Builtins.y2milestone("Overriding encoding %1 with UTF-8", Encoding.console )
Encoding.console = "UTF-8"
end

Builtins.y2milestone(
"Language %1 -> Console encoding %2",
@language,
Expand Down

0 comments on commit a14be91

Please sign in to comment.