Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How do I normalize (e.g. strip) diacritical märks from a Unicode string?

by brycen (Monk)
on Apr 17, 2010 at 07:36 UTC ( [id://835240]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $str = Unicode::Normalize::NFKD($str);
    $str =~ s/\p{NonspacingMark}//g;
    
  2. or download this
    ## Demonstrate stripping of diacritical marks from Unicode strings
    ## April 2010, Bryce Nesbitt, Berkeley Electronic Press
    ...
        }
        return $outstring;
    }
    
  3. or download this
    Input: <0x1ec5> m<0xe4>rks <0xfb00> <0x153>
    NFKD : e<0x302><0x303> ma<0x308>rks ff <0x153>
    Out  : e marks ff <0x153>
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-26 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found