From 8f96eeef490dbe3f4e4c5c278b1206c2dac518cd Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 5 Apr 2005 09:39:22 +0000 Subject: replace the latin-charset unbreakable space with a "use utf8" and the utf8 unbreakable space --- perl-install/ugtk2.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'perl-install') 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'}; -- cgit v1.2.1