New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strangness with utf8 and warn #5194
Comments
From jfriedl@yahoo.comCreated by jfriedl@yahoo-icn.comResubmitting this with perlbug, so it gets tracked.... I've run into a very weird problem that seems to be related to utf8. I would expect this program: use charnames ':full'; my $text = "x\N{LATIN SMALL LETTER SHARP S}Yz"; warn (($text =~ m/SSY/i) ? "okay" : "bad"); to produce either However, with bleedperl as of an hour or so ago, it produces simply bad. (no source file or line number). If \N{LATIN SMALL LETTER SHARP S} is replaced by \xDF, the warn() works But now for some uber-strangeness: if you leave \N{LATIN SMALL LETTER SHARP S} Jeffrey Perl Info
|
From @jhiStill no resolution for this but I created a cutdown version without using $_ = "foo"; and I also spent some time in the debugger and it seems that |
From perl5-porters@perl.orgHere's a weird optree problem for someone, from Jeffrey Friedl... Still no resolution for this but I created a cutdown version without using $_ = "foo"; and I also spent some time in the debugger and it seems that -- |
From enache@rdslink.roOn Mon, Feb 03, 2003 at 05:52:17PM +0200, Jarkko Hietaniemi wrote:
This fixes it for me: Inline Patch--- /arc/perl-current/utf8.c 2003-01-07 12:34:01.000000000 +0200
+++ perl-current/utf8.c 2003-02-04 11:35:41.000000000 +0200
@@ -1517,6 +1517,7 @@ Perl_swash_init(pTHX_ char* pkg, char* n
SV* errsv_save;
if (!gv_fetchmeth(stash, "SWASHNEW", 8, -1)) { /* demand load utf8 */
+ COP *ocurcop = PL_curcop;
ENTER;
errsv_save = newSVsv(ERRSV);
Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpv(pkg,0), Nullsv);
@@ -1524,6 +1525,7 @@ Perl_swash_init(pTHX_ char* pkg, char* n
sv_setsv(ERRSV, errsv_save);
SvREFCNT_dec(errsv_save);
LEAVE;
+ PL_curcop = ocurcop;
}
SPAGAIN;
PUSHSTACKi(PERLSI_MAGIC);
--------------------------------------------------------------------
This is some kind of reversed backtrace: Maybe the save/retrieve should be made even deeper The /i flag is really confusing. When it's left out, Perl aggressively $ perl -Dt -e '$_="foo"; utf8::upgrade($_); warn (/bar/i ? "bar" : "no bar");' 2> Regards |
From @rgsEnache Adrian <enache@rdslink.ro> wrote:
Thanks, for the patch, but I've already fixed it in a less intrusive However I have the impression that your patch is more correct than
|
From sky@nanisky.comOn tisdag, feb 4, 2003, at 11:15 Europe/Stockholm, Enache Adrian wrote:
Nice one, but I think you are correct that the fix should be in Arthur |
From enache@rdslink.roOn Tue, Feb 04, 2003 at 11:25:41AM +0100, Rafael Garcia-Suarez wrote:
I didn't know about your patch. I only read the P5P list.
cop_file(gv) is correct because Perl_scalarseq() sets PL_curcop to You may consider saving/restoring the PL_curcop pointer instead of Regards |
From sky@nanisky.comOn tisdag, feb 4, 2003, at 18:35 Europe/Stockholm, Enache Adrian wrote:
I think that we should restore the interpreter state to the correct Arthur |
From @rgsA. Bergman wrote:
Thus I applied the following : (change is in Perl_vload_module()) Change 18656 by rgs@rgs-home on 2003/02/04 20:02:56 Better version of change #18648, by Enache Adrian Affected files ... ... //depot/perl/op.c#537 edit Differences ... ==== //depot/perl/op.c#537 (text) ==== @@ -2964,14 +2964,14 @@ utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0), |
From @jhiSince the issue got resolved, I added now the original test case and will mark |
@jhi - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#8760 (status was 'resolved')
Searchable as RT8760$
The text was updated successfully, but these errors were encountered: