Skip to content

Instantly share code, notes, and snippets.

@yannvery
Created January 15, 2014 09:31
Show Gist options
  • Save yannvery/8433321 to your computer and use it in GitHub Desktop.
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
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