1

tr not replacing apostrophe

view story
linux-howto

http://unix.stackexchange.com – I want to convert all apostrophes in this file to X: Bob's book Bob’s book Bob′s book # (Might look the same but actually different) The first apostrophe is replaced as expected: $ cat file | tr "'" "X" BobXs book Bob’s book Bob′s book But the the two other kinds of apostrophe, strange things happen: $ cat file | tr "’" "X" Bob's book BobXXXs book BobXX�s book $ cat file | tr "′" "X" Bob's book BobXX�s book BobXXXs book How to make it work? (HowTos)