Created
November 27, 2017 06:55
-
-
Save jongyeol/c30a4a0cf7420a3dd8ed9faad3433a08 to your computer and use it in GitHub Desktop.
nfc-nfd
This file contains hidden or 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
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use Encode qw/encode decode/; | |
use Unicode::Normalize qw/compose/; | |
while(<>) { | |
my $line = compose(decode('utf8',$_)); | |
print encode('utf8',$line); | |
} |
This file contains hidden or 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
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use Encode qw(encode decode); | |
use Unicode::Normalize qw(compose normalize); | |
binmode STDOUT, ':encoding(UTF-8)'; | |
while(<>) { | |
my $line = normalize('D',decode('utf8',$_)); | |
print $line; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment