Created
January 15, 2014 09:31
-
-
Save yannvery/8433321 to your computer and use it in GitHub Desktop.
Remove accented char in perl, it can be useful when you use SOAP::Lite that use a Base64 encoding for data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use utf8; | |
use Unicode::Normalize; | |
my $test = "Vous avez aimé l'épée offerte par les elfes à Frodon"; | |
my $decomposed = NFKD( $test ); | |
$decomposed =~ s/\p{NonspacingMark}//g; | |
print $decomposed; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment