ascii-only: safely handle non-unicode characters
This commit is contained in:
parent
3d715ef18e
commit
64906e2ffb
@ -4,11 +4,12 @@ ascii() {
|
||||
coproc toascii {
|
||||
perl -e '
|
||||
use utf8;
|
||||
use Encode;
|
||||
use Text::Unidecode;
|
||||
use open qw(:std :utf8);
|
||||
$| = 1;
|
||||
while (<>) {
|
||||
print(unidecode($_));
|
||||
print(unidecode(encode("utf-8", $_)));
|
||||
}'
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user