Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: The Björk Situation

by brycen (Monk)
on Oct 19, 2010 at 03:51 UTC ( #866102=note: print w/replies, xml ) Need Help??


in reply to The Björk Situation

Try this clip, if your code is in Unicode-land:
# Function: translate_diacriticals() # # Remove diacritical marks (e.g. ümlauts, hebrew vowels, etc) # for use in fuzzy matches, or for avoiding excess information loss # when encoding to restricted character sets like ASCII. # # See also: # http://www.perlmonks.org/?node_id=835238 # http://en.wikipedia.org/wiki/Diacritic # http://en.wikipedia.org/wiki/Unicode_equivalence # http://unicode.org/reports/tr15/ # http://www.faqs.org/rfcs/rfc3454.html # sub translate_diacriticals($) { my $str = Unicode::Normalize::NFKD($_[0]); $str =~ s/\p{NonspacingMark}//g; return $str; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://866102]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-12-09 00:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?