On Sat, Sep 24, 2011 at 11:11:10PM +0100, John Delacour wrote:
> At 16:33 -0400 24/9/11, Ronald J Kimball wrote:
>
> >.. Here's a Perl script that does it:
> >
> >#!perl -p
> >
> >s{(«)([^»]+)(»)}{my $x = $2; $x =~ tr,A-Za-z0-9 -,,cd; "$1$x$3"}ge;
> >
> >__END__
>
>
> It works with this:
>
> one «abç» two «abc∂» three «aßcdé»
>
> but not with this:
>
> one «a®bc» two «abc®™» three «®®a»
Unicode can be such a pain... Not my area of expertise, unfortunately. I
haven't figured out yet how to fix the filter. Anyone else know the magic
combination of pragmas and encodings?
> and the eval might make it fail on a server.
I'm not sure why you think that.
Ronald
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>