summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-24 18:50:44 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-24 18:50:44 +0000
commit9a6b37afdd6bd69407c7dbe46c2a4213af8e0a11 (patch)
tree28b478ae91e9be3c1796dc78ddc69978e17b975f
parent999c17a01b11c1925be23763e0ec6b70e7ed6522 (diff)
downloadurpmi-9a6b37afdd6bd69407c7dbe46c2a4213af8e0a11.tar
urpmi-9a6b37afdd6bd69407c7dbe46c2a4213af8e0a11.tar.gz
urpmi-9a6b37afdd6bd69407c7dbe46c2a4213af8e0a11.tar.bz2
urpmi-9a6b37afdd6bd69407c7dbe46c2a4213af8e0a11.tar.xz
urpmi-9a6b37afdd6bd69407c7dbe46c2a4213af8e0a11.zip
Fix bug 13946: output from urpmq not converted from utf-8 when under a
non-utf-8 locale.
-rwxr-xr-xurpmq23
1 files changed, 14 insertions, 9 deletions
diff --git a/urpmq b/urpmq
index 355defa4..59d3147e 100755
--- a/urpmq
+++ b/urpmq
@@ -372,7 +372,7 @@ if ($urpm::args::options{list_aliases}) {
printf "%-12s: %s\n", "Name", $pkg->name;
printf "%-12s: %s\n", "Version", $pkg->version;
printf "%-12s: %s\n", "Release", $pkg->release;
- printf "%-12s: %s\n", "Group", $pkg->group;
+ print from_utf8(sprintf("%-12s: %s\n", "Group", $pkg->group));
printf "%-12s: %-28s %12s: %s\n", "Size", $pkg->size, "Architecture", $pkg->arch;
if ($pkg->sourcerpm || $pkg->buildhost) {
if ($pkg->sourcerpm && $pkg->buildhost) {
@@ -383,16 +383,21 @@ if ($urpm::args::options{list_aliases}) {
$pkg->sourcerpm and printf "%-12s: %s\n", "Build Host", $pkg->buildhost;
}
}
- $pkg->packager and printf "%-12s: %s\n", "Packager", $pkg->packager;
+ $pkg->packager and print from_utf8(sprintf("%-12s: %s\n", "Packager", $pkg->packager));
$pkg->url and printf "%-12s: %s\n", "URL", $pkg->url;
- $pkg->summary and printf "%-12s: %s\n", "Summary", $pkg->summary;
+ $pkg->summary and print from_utf8(sprintf("%-12s: %s\n", "Summary", $pkg->summary));
my $updesc = $updates_descr->{$pkg->name};
- $pkg->description && !$updesc->{description} and printf "%-12s:\n%s\n", "Description", $pkg->description;
+ $pkg->description && !$updesc->{description}
+ and print from_utf8(sprintf("%-12s:\n%s\n", "Description", $pkg->description));
if ($updesc) {
- $updesc->{description} and printf "%-12s:\n%s\n", "Description", $updesc->{description};
- $updesc->{updated} and printf "%-20s: %s\n", "Last updated", $updesc->{updated};
- $updesc->{importance} and printf "%-20s: %s\n", "Update importance", $updesc->{importance};
- $updesc->{pre} and printf "%-20s:\n%s\n", "Reason for update", $updesc->{pre};
+ $updesc->{description}
+ and print from_utf8(sprintf("%-12s:\n%s\n", "Description", $updesc->{description}));
+ $updesc->{updated}
+ and print from_utf8(sprintf("%-20s: %s\n", "Last updated", $updesc->{updated}));
+ $updesc->{importance}
+ and print from_utf8(sprintf("%-20s: %s\n", "Update importance", $updesc->{importance}));
+ $updesc->{pre}
+ and print from_utf8(sprintf("%-20s:\n%s\n", "Reason for update", $updesc->{pre}));
}
}
if ($urpm::args::options{list_files}) {
@@ -405,7 +410,7 @@ if ($urpm::args::options{list_aliases}) {
if ($urpm::args::options{changelog}) {
if ($pkg->changelog_time && $pkg->changelog_name && $pkg->changelog_text) {
print join("\n", mapn {
- "* ".urpm::msg::localtime2changelog($_[0])." $_[1]\n\n$_[2]\n"
+ from_utf8("* ".urpm::msg::localtime2changelog($_[0])." $_[1]\n\n$_[2]\n")
} [ $pkg->changelog_time ], [ $pkg->changelog_name ], [ $pkg->changelog_text ]
);
} else {