perl -Mopen=:std,:encoding(UTF-8) -pe " y/\x{2018}\x{2019}\x{201B}\x{201C}\x{201D}\x{201F}/\x27\x27\x27\x22\x22\x22/; " < input > output #### perl -i.orig -Mopen=:std,:encoding(UTF-8) -pe " y/\x{2018}\x{2019}\x{201B}\x{201C}\x{201D}\x{201F}/\x27\x27\x27\x22\x22\x22/; " in1 in2 in3 in4 in5