Show
Ignore:
Timestamp:
09/28/06 06:48:03 (2 years ago)
Author:
audreyt
Message:

* Unicode support for the embedded Perl5 bridge. (This takes effect iff

the embedded Perl supports SvUTF8_on, typically Perl 5.8+.)

  • Source code in eval('...', :lang<perl5>) can now contain non-ASCII characters; they are treated as if "use utf8;" is in effect.
  • Str objects passing from Pugs land into Perl 5 are always turned into SvUTF8_on unicode strings.
  • Strings passed from Perl 5 to Pugs land are always converted into Unicode Str objects for now; this may be relaxed once we have a native Buf type in Pugs land.
  • Both named and unnamed regexes now assumes Unicode semantics.

* Use New()/Safefree() instead of malloc()/free() in p5embed APIs.

* Use svpvn and CStringLen instead of svpv and CString, so strings with

embedded nulls can be safely passed either way.

* In non-embedded builds, call binmode(STDIN, ':utf8') only on

Perl 5.7 or later.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/Match.hs

    r13513 r13710  
    5050    let ruleEngine | Just "PGE" <- rv   = evalPGE 
    5151                   | otherwise          = evalPCR 
    52     pge  <- liftIO $ ruleEngine pwd (encodeUTF8 cs) (encodeUTF8 text) subrules 
     52    pge  <- liftIO $ ruleEngine pwd cs text subrules 
    5353            `catchIO` (\e -> return $ show e) 
    5454    rv  <- tryIO Nothing $ fmap Just (readIO $ decodeUTF8 pge)