[pve-devel] [PATCH installer] fix #2313: load country.dat file with utf8 encoding

Dominik Csapak d.csapak at proxmox.com
Fri Aug 9 12:47:55 CEST 2019


this fixes the display and selection problem with countries that
have non-ascii symbols in them, like "Côte d'Ivoire"

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 proxinstall | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxinstall b/proxinstall
index 963152a..d9e2211 100755
--- a/proxinstall
+++ b/proxinstall
@@ -620,7 +620,7 @@ sub hd_list {
 
 sub read_cmap {
     my $countryfn = "${proxmox_libdir}/country.dat";
-    open (TMP, "<$countryfn") || die "unable to open '$countryfn' - $!\n";
+    open (TMP, "<:encoding(utf8)", "$countryfn") || die "unable to open '$countryfn' - $!\n";
     my $line;
     my $country = {};
     my $countryhash = {};
-- 
2.20.1





More information about the pve-devel mailing list