bashechounicode-literals

"echo" this special escaped char in bash


I am struggling to print out (i.e. echo) the non-ASCII Unicode character "Latin Capital Letter C with Caron" U+010C.

As can be seen in my online Python IDE, the code compiles and prints the character successfully. However, I cannot get similar code to work in Bash. So far, I have been using an online Bash shell.

How can I get this to run in Bash?


Solution

  • Use the -e flag which enables the interpretation of escaped characters.

    echo -e 'https://codepoints.net/\u010C?lang=en'