On Oct 5, 2004, at 4:25 PM, Stas Bekman wrote:
So there is no CPAN lib that does that in C?
Not that I know of. But keeping track of the flag should be dead simple. See the Encode sources. No, let me share them with you:
SV * _utf8_on(sv) SV * sv CODE: { if (SvPOK(sv)) { SV *rsv = newSViv(SvUTF8(sv)); RETVAL = rsv; SvUTF8_on(sv); } else { RETVAL = &PL_sv_undef; } } OUTPUT: RETVAL
SV * _utf8_off(sv) SV * sv CODE: { if (SvPOK(sv)) { SV *rsv = newSViv(SvUTF8(sv)); RETVAL = rsv; SvUTF8_off(sv); } else { RETVAL = &PL_sv_undef; } } OUTPUT: RETVAL
Or do you by chance familiar with the work by jeff baker (which is supposedly written in C)? may be it deals correctly with that issue?
No, and a quick Googling only gives me links to the ToDo list (and to "The Fabulous Baker Boys" DVD: Michelle Pfeiffer, YUM!).
Ahem.
Alternatively we could just borrow ap_escape_html and rewrite it to not use the pool, but Perl's memory allocator.
/me doesn't care, as long as utf8 works properly.
Regards,
David
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]