in reply to Re^2: Search & replace of UTF-8 characters ?
in thread Search & replace of UTF-8 characters ?

If you added some means of decoding to STDIN and encoding STDOUT, yes.

>perl -CSD -we"print chr 0x2660" | perl -CSD -we"printf qq{%X\n}, ord +<STDIN>" 2660

-C even works if you read STDIN through ARGV:

>perl -CSD -we"print chr 0x2660" | perl -CSD -we"printf qq{%X\n}, ord +<>" 2660

I don't have time to check the other tools right now.

Update: Hey! -C DOES work with ARGV. I knew binmode and use open had problems with ARGV, so I took the OP's word for it when he said -C didn't work with it either.

>perl -CSD -we"print chr 0x2660" > foo >perl -CSD -we"printf qq{%X\n}, ord <>" foo 2660