summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-04-05 09:39:22 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-04-05 09:39:22 +0000
commit8f96eeef490dbe3f4e4c5c278b1206c2dac518cd (patch)
treed352fca4fd4ff544d238baa1c98292817784aa6d
parent85b8cf780ca31427261c87b51cc380ce07bb2136 (diff)
downloaddrakx-backup-do-not-use-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.tar
drakx-backup-do-not-use-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.tar.gz
drakx-backup-do-not-use-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.tar.bz2
drakx-backup-do-not-use-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.tar.xz
drakx-backup-do-not-use-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.zip
replace the latin-charset unbreakable space with a "use utf8" and the utf8 unbreakable space
-rw-r--r--perl-install/ugtk2.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 4d21d3aec..2368971e4 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -796,7 +796,10 @@ sub wrap_paragraph {
my ($text, %options) = @$_;
#- hack :( if ' ' is at the beginning, do not forget it, substitute
#- with an unbreakable space because gtk allocates too much space otherwise
- $text =~ /^ (.*)/ and $text = " $1";
+ if ($text =~ /^ (.*)/) {
+ use utf8;
+ $text = ' ' . $1;
+ }
my @newlines = get_text_coord($text, $widget4style, $max_width, $currentx, $ydec);
$currentx = $newlines[-1]{'x'} + $newlines[-1]{width};
$ydec = $newlines[-1]{'y'};