List Info

Thread: Re: Regexp failure with utf8-flagged string and byte-flagged pattern




Re: Regexp failure with utf8-flagged string and byte-flagged pattern
user name
2007-09-22 06:37:55
MOIN,

ON SATURDAY 22 SEPTEMBER 2007 13:19:48 DEMERPHQ WROTE:
> ON 9/22/07, TELS <NOSPAM-ABUSEBLOODGATE.COM> WROTE:
> > MOIN,
> >
> > ON SATURDAY 22 SEPTEMBER 2007 12:25:52 TELS
WROTE:
> > > MOIN,
> >
> > [SNIP]
> >
> > > MAKE && MAKE TEST STILL RUNS, I WILL
REPORT IN PROBABLY 25 MINS HOW
> > > IT GOES.
> >
> > ATTACHED IS THE PATCH I USED. UNFORTUNATELY, IT
DOESN'T SEEM TO WORK,
> > AS YOU CAN SEE FROM THE OUTPUT ALSO ATTACHED :(
>
> DANG. I GUESS ITLL HAVE TO WAIT UNTIL I HAVE THE TIME
AND
> CIRCUMSTANCES TO LOOK INTO THIS FURTHER.

DO YOU HAVE ANY HINTS ON WHAT THE "SOMETHING'S
WRONG" WARNING MEANS OR WHERE 
IT COMES FROM?

I MIGHT HAVE A TRY WITH "DEBUG => ALL" AND SEE
WHAT I CAN GLEAN FROM IT. IN 
ANY WAY, REMOTE DEBUGGING VIA PROXY[TM] ISN'T EASY 

ALL THE BEST,

TELS



-- 
 SIGNED ON SAT SEP 22 13:36:55 2007 WITH KEY 0X93B84C15.
 GET ONE OF MY PHOTO POSTERS: HTTP://BLOODGATE.COM/POSTERS
 PGP KEY ON HTTP://BLOODGATE.COM/TELS.ASC OR PER EMAIL.

 "FüR EINE SOLCHE BITRATENREDUKTION MUSS ICH DEN
TRANSCODER SO
 UMKONFIGURIEREN, DASS ER GRößERE
QUANTISIERUNGSKOEFFIZIENTEN FüR DIE
 MPEG-MATRIZEN VERWENDET, CAPTAIN" - "AN DIE
ARBEIT, MR. LAFORGE."

  -- JENS BAUMEISTER IN HTTP://TINYURL.COM/OOMB
Re: Regexp failure with utf8-flagged string and byte-flagged pattern
user name
2007-09-22 06:48:48
On 9/22/07, Tels <nospam-abusebloodgate.com> wrote:
> Moin,
>
> On Saturday 22 September 2007 13:19:48 demerphq wrote:
> > On 9/22/07, Tels <nospam-abusebloodgate.com> wrote:
> > > Moin,
> > >
> > > On Saturday 22 September 2007 12:25:52 Tels
wrote:
> > > > Moin,
> > >
> > > [snip]
> > >
> > > > make && make test still runs, I
will report in probably 25 mins how
> > > > it goes.
> > >
> > > Attached is the patch I used. Unfortunately,
it doesn't seem to work,
> > > as you can see from the output also attached
:(
> >
> > Dang. I guess itll have to wait until i have the
time and
> > circumstances to look into this further.
>
> Do you have any hints on what the "something's
wrong" warning means or where
> it comes from?

Its the normal warning produced by 'warn' when called with
no arguments.

d:sync-clone>perl -e"warn"
Warning: something's wrong at -e line 1.

> I might have a try with "DEBUG => ALL" and
see what I can glean from it. In
> any way, Remote Debugging Via Proxy[tm] isn't easy 

Hmm. Actually i just realized that I was being dumb, folder
is only
true when !UTF and we are doing a case insensitive match.
Change the
patch as follows and I think it should work. (IOW instead of
replace
the if (folder) line, insert after it the new logic with the
right
test):

                     /* store the codepoint in the bitmap,
and if its ascii
                        also store its folded equivelent.
*/
                     TRIE_BITMAP_SET(trie,uvc);
                     if ( folder )
TRIE_BITMAP_SET(trie,folder[ uvc ]);
+
+		    if ( !UTF ) {
+			/* store first byte of utf8 representation of
+			   codepoints in the 127 < uvc < 256 range */
+			if (127 < uvc && uvc < 192) {
+			    TRIE_BITMAP_SET(trie,194);
+			} else if (191 < uvc ) {
+			    TRIE_BITMAP_SET(trie,195);
+			/* && uvc < 256 -- we know uvc is < 256
already */
+			}
+		    }
                     set_bit = 0; /* We've done our bit  */
                 }
             } else {

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )