3

My terminal is set to UTF-8. If I type this:

echo -n 'ýá' | xxd

I can see this output:

00000000: c3bd c3a1

Which is fine. Now I would like to remove the 'ý' character from the string, so I use:

echo -n 'ýá' | tr -d 'ý' | xxd

But the result will be:

00000000: a1

The tr removes also the next c3 byte, but that is part of the 'á' character. Why is working this way? Is this a bug? Or should I set something?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255

0 Answers0