[Debconf-devel] Bug#566954: Dialog frontend cannot display literal '\n'
Joey Hess
joeyh at debian.org
Sun Jan 31 20:03:15 UTC 2010
Ben Hutchings wrote:
> --- a/Debconf/FrontEnd/Dialog.pm
> +++ b/Debconf/FrontEnd/Dialog.pm
> @@ -163,7 +163,13 @@
> my $lines = $this->screenheight;
> my ($text, $height, $width)=$this->sizetext($intext);
>
> - my @lines = split(/\n/, $text);
> + sub hide_escape {
> + my $line = $_;
> + $line =~ s/\\n/\\\xe2\x81\xa0n/g;
> + return $line;
> + }
> +
> + my @lines = map(&hide_escape, split(/\n/, $text));
> my $num;
> my @args=('--msgbox', join("\n", @lines));
> if ($lines - 4 - $this->borderheight <= $#lines) {
> --- END ---
>
> I also tried writing the ZWJ character as \x{2060}.
FYI, all you got wrong was not doing the escaping in all the callpoints
for dialog.
--
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debconf-devel/attachments/20100131/c958d7cd/attachment.pgp>
More information about the Debconf-devel
mailing list