summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
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 /perl-install/ugtk2.pm
parent85b8cf780ca31427261c87b51cc380ce07bb2136 (diff)
downloaddrakx-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.tar
drakx-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.tar.gz
drakx-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.tar.bz2
drakx-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.tar.xz
drakx-8f96eeef490dbe3f4e4c5c278b1206c2dac518cd.zip
replace the latin-charset unbreakable space with a "use utf8" and the utf8 unbreakable space
Diffstat (limited to 'perl-install/ugtk2.pm')
-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'};