0

How can I use accented Latin characters like these (or any other unicode char really) in my echo statements comments?

À à Á á Â â Ã ã
É é Ê ê 
Í í 
Ó ó Õ õ
Ú ú
Ç ç
Ñ ñ
  • 1
    What OS are you using? – ctrl-alt-delor Oct 10 '15 at 21:22
  • So far noting but when I save the file in gedit I get the diamond shaped character instead. – Miguel M Oct 11 '15 at 0:11
  • Check what encoding gedit and your terminal emulator is configured for. Everything should be configured for utf-8, unless there is good reason otherwise. – ctrl-alt-delor Oct 11 '15 at 15:20
1

Modern Unixes use utf-8, this is the same as 7bit-ascii, but has extension bytes for other unicode characters. If your terminal is set to utf-8, then you can paste in the characters in you question.

e.g.

echo À à Á á Â â Ã ã

If you wish to type them, then I suggest enabling a compose key. Then you can type compose A ~ for Ã. Or compose : ) for ☺.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.