From 0ac3592b92c42eb8040b4270b9f6dec4089f7e41 Mon Sep 17 00:00:00 2001 From: Hiroshi Umehara Date: Wed, 21 Jan 2015 16:10:12 +0900 Subject: [PATCH] Add EUC-JP locale name normalization The function normalizes checks for UTF-8, but the same issue exists for other locales as well. This fix adds normalization for EUC-JP, a Japanese locale. --- lib/ansible/modules/extras/system/locale_gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/system/locale_gen.py b/lib/ansible/modules/extras/system/locale_gen.py index 9ff0a87f36..edf637fecb 100644 --- a/lib/ansible/modules/extras/system/locale_gen.py +++ b/lib/ansible/modules/extras/system/locale_gen.py @@ -44,7 +44,7 @@ def is_present(name): def fix_case(name): """locale -a might return the encoding in either lower or upper case. Passing through this function makes them uniform for comparisons.""" - return name.replace(".utf8", ".UTF-8") + return name.replace(".utf8", ".UTF-8").replace(".eucjp", ".EUC-JP") def replace_line(existing_line, new_line): """Replaces lines in /etc/locale.gen"""