Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: The Björk Situation

by brycen (Monk)
on Oct 19, 2010 at 03:51 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-29 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found