develooper Front page | perl.perl5.porters | Postings from March 2008

Re: [perl #52104] Text::Wrap::wrap() generates a segfault with Cyrillic characters when the utf8 flag is turned on

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
March 27, 2008 16:42
Subject:
Re: [perl #52104] Text::Wrap::wrap() generates a segfault with Cyrillic characters when the utf8 flag is turned on
Message ID:
20080327234223.GM79799@plum.flirble.org
On Thu, Mar 27, 2008 at 10:41:51PM +0100, Frdric Buclin wrote:
> For all installations which do not have the not-yet-released Perl 5.8.9, 
> which workaround(s) do they have? On critical installations, it's hard 
> to upgrade Perl as it's a pretty heavy change.

Given that the bug means that using pos inside the replacement in s///e isn't
going to work with Unicode, it unfortunately is as simple and restrictive as
"don't do that then". Which, I guess, in this case means not triggering the
replacement in Text::Tabs::expand(), which does just that.

For Bugzilla, as it's generating HTML for web pages, if it's not text in <pre>
tags, am I right in assuming that it doesn't matter in the HTML source whether
it's "\t" or " ", as whitespace is equivalent and folded? If so, can it be
worked round by translating all "\t" to " " before the call to Text::Wrap?

Or is this explicitly for fixed width text, where formatting of tabs at
tabstops is an issue?

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About