diff options
-rw-r--r-- | perl-install/c/stuff.pm | 3 | ||||
-rw-r--r-- | perl-install/c/stuff.xs.pl | 7 | ||||
-rw-r--r-- | perl-install/common.pm | 9 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 4 | ||||
-rw-r--r-- | perl-install/lang.pm | 2 | ||||
-rw-r--r-- | perl-install/network/modem.pm | 2 | ||||
-rw-r--r-- | perl-install/wizards.pm | 2 |
7 files changed, 14 insertions, 15 deletions
diff --git a/perl-install/c/stuff.pm b/perl-install/c/stuff.pm index 405f896cd..37e0c9a3b 100644 --- a/perl-install/c/stuff.pm +++ b/perl-install/c/stuff.pm @@ -11,7 +11,4 @@ $VERSION = '0.01'; c::stuff->bootstrap($VERSION); -sub from_utf8 { iconv($_[0], "utf-8", standard_charset()) } -sub to_utf8 { iconv($_[0], standard_charset(), "utf-8") } - 1; diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index 59c842993..8ad3fd82d 100644 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -666,13 +666,6 @@ upgrade_utf8(s) CODE: sv_utf8_upgrade(s); -char * -standard_charset() - CODE: - RETVAL = nl_langinfo(CODESET); - OUTPUT: - RETVAL - void get_iso_volume_ids(int fd) INIT: diff --git a/perl-install/common.pm b/perl-install/common.pm index c88451d85..0894bef71 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -68,6 +68,15 @@ sub translate { $s; } +sub from_utf8 { + my ($s) = @_; + Locale::gettext::iconv($s, "utf-8", undef); #- undef = locale charmap = nl_langinfo(CODESET) +} +sub to_utf8 { + my ($s) = @_; + Locale::gettext::iconv($s, undef, "utf-8"); #- undef = locale charmap = nl_langinfo(CODESET) +} + #- This is needed because text printed by Gtk2 will always be encoded #- in UTF-8; #- we first check if LC_ALL is defined, because if it is, changing diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 98888fbec..4c16cbcaf 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -301,7 +301,7 @@ sub choosePackagesTree { [ N("Version: "), $tag ], [ $p->version . '-' . $p->release . "\n" ], [ N("Size: "), $tag ], [ N("%d KB\n", $p->size / 1024) ], if_($imp, [ N("Importance: "), $tag ], [ "$imp\n" ]), - [ "\n" ], [ formatLines(c::from_utf8($p->description)) ] ]; + [ "\n" ], [ formatLines(common::from_utf8($p->description)) ] ]; }, toggle_nodes => sub { my $set_state = shift @_; @@ -502,7 +502,7 @@ sub installPackages { } elsif ($type eq 'open') { gtkval_modify(\$pkg_progress, 0); my $p = $packages->{depslist}[$id]; - mygtk2::gtkadd($pkg_log_widget, text => sprintf("\n%s: %s", $p->name, (split /\n/, c::from_utf8($p->summary))[0] || '')); + mygtk2::gtkadd($pkg_log_widget, text => sprintf("\n%s: %s", $p->name, (split /\n/, common::from_utf8($p->summary))[0] || '')); $current_total_size += $last_size; $last_size = $p->size; $advertize->(1) if $show_advertising && $total_size > 20_000_000 && time() - $change_time > 20; diff --git a/perl-install/lang.pm b/perl-install/lang.pm index e4e6df54d..9426825c9 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -1138,7 +1138,7 @@ sub write { if (!$b_user_only) { my $kde_charset = charset2kde_charset(l2charset($locale->{lang})); - my $welcome = c::to_utf8(N("Welcome to %s", '%n')); + my $welcome = common::to_utf8(N("Welcome to %s", '%n')); log::explanations(qq(Configuring KDM/MdkKDM)); substInFile { s/^(GreetString)=.*/$1=$welcome/; diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index 9b0a9c3f3..29afb69a4 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -156,7 +156,7 @@ END $toreplace{$_->[0]} = $modem->{$_->[0]} || $_->[1] foreach [ 'Timeout', 60 ], [ 'UseLockFile', 1 ], [ 'Enter', 'CR' ], [ 'Volume', 0 ], [ 'BusyWait', 0 ], [ 'FlowControl', 'CRTSCTS' ], [ 'Speed', 115200 ]; - output($modem->{kppprc} || "$::prefix/usr/share/config/kppprc", c::to_utf8(<<END)); + output($modem->{kppprc} || "$::prefix/usr/share/config/kppprc", common::to_utf8(<<END)); # KDE Config File [Account0] diff --git a/perl-install/wizards.pm b/perl-install/wizards.pm index cb40c881e..2a8e282c7 100644 --- a/perl-install/wizards.pm +++ b/perl-install/wizards.pm @@ -92,7 +92,7 @@ sub check_rpm { my ($in, $rpms) = @_; foreach my $rpm (@$rpms) { next if $in->do_pkgs->is_installed($rpm); - if ($in->ask_okcancel(N("Error"), N("%s is not installed\nClick \"Next\" to install or \"Cancel\" to quit", c::from_utf8($rpm)))) { + if ($in->ask_okcancel(N("Error"), N("%s is not installed\nClick \"Next\" to install or \"Cancel\" to quit", common::from_utf8($rpm)))) { $::testing and next; if (!$in->do_pkgs->install($rpm)) { local $::Wizard_finished = 1; |