summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-12-15 09:14:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-12-15 09:14:01 +0000
commita4e6acb7d49063a117261eaf85f31fcfd281bfe7 (patch)
tree36b2cbf3eaf039df24ca47d72cf921a4a539d4ca /perl-install/common.pm
parente26e8e595f1e0ba4b043e1225bfd34fb9387ee04 (diff)
downloaddrakx-a4e6acb7d49063a117261eaf85f31fcfd281bfe7.tar
drakx-a4e6acb7d49063a117261eaf85f31fcfd281bfe7.tar.gz
drakx-a4e6acb7d49063a117261eaf85f31fcfd281bfe7.tar.bz2
drakx-a4e6acb7d49063a117261eaf85f31fcfd281bfe7.tar.xz
drakx-a4e6acb7d49063a117261eaf85f31fcfd281bfe7.zip
- i had foolishly removed c::iconv whereas it was used still used by c::from_utf8 and c::to_utf8
- anyway, moving c::from_utf8 and c::to_utf8 to common::from_utf8 and common::to_utf8 - making them use Locale::gettext::iconv - Locale::gettext::iconv transform undef into standard charset (1.05-2mdk) - drop c::standard_charset (now unused)
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm9
1 files changed, 9 insertions, 0 deletions
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