Just to throw this out there: you may be interested in Text::Unidecode
(http://search.cpan.org/~sburke/Text-Unidecode-0.04/) if your ultimate
goal is to try to represent a unicode character with its closest ascii
(or perhaps I should say, "romanized") equivalent.
-- Brad
On Wed, May 7, 2008 at 9:
I received a number of helpful suggestions and solutions. The approach I
decided to adopt in my larger script is to 'decode' all the incoming form input
as UTF-8 as well as the input from the database that I'll be matching the form
input against. This seems to allow the '\p{M}' syntax to work
Hi Michael,
"Doran, Michael D" <[EMAIL PROTECTED]> wrote:
> I'm trying to strip out combining diacritics from some form input using
> this code:
> [...]
> $sans_diacritics =~ s/\p{M}*//g;
I do it like this:
use Encode;
use Unicode::Normalize qw(normalize);
my $ascii = encode('ascii', normali