aboutsummaryrefslogtreecommitdiffstats
path: root/grpmi
diff options
context:
space:
mode:
Diffstat (limited to 'grpmi')
-rwxr-xr-xgrpmi/grpmi.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/grpmi/grpmi.pl b/grpmi/grpmi.pl
index 3783ce3d..c01bee24 100755
--- a/grpmi/grpmi.pl
+++ b/grpmi/grpmi.pl
@@ -34,9 +34,15 @@ sub translate {
my ($s) = @_;
$s ? c::dgettext('grpmi', $s) : '';
}
+sub sprintf_fixutf8 {
+ my $need_upgrade;
+ $need_upgrade |= to_bool(c::is_tagged_utf8($_)) + 1 foreach @_;
+ if ($need_upgrade == 3) { c::upgrade_utf8($_) foreach @_ };
+ sprintf shift, @_;
+}
sub _ {
my $s = shift @_; my $t = translate($s);
- sprintf $t, @_;
+ sprintf_fixutf8 $t, @_;
}
sub mexit { ugtk2::exit(undef, @_) }