0

I've seen some questions similar to this one but I'm not being able to use the solutions of those to help me. So, what is my problem?, I have a file with the characters ç, ã, à, etc... but they don't print on the terminal when I use either awk, cat, grep, etc... The terminal and my font can and do support these characters.

My locale is set to en_GB.UTF-8 and the output of the command locale is:

LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=en_GB.UTF-8
4
  • 4
    1. Can you paste ç, ã, à in your terminal and see them? 2. Can you echo "ç, ã, à" > testfile; cat testfile and see how it works? Jul 15, 2021 at 14:35
  • @ArtemS.Tashkinov What you said works just fine!!! When I do ```file testfile````, It says its UTF-8
    – ESilva
    Jul 15, 2021 at 14:52
  • The way the question is formulated is wrong. The solution is also wrong. Jul 15, 2021 at 20:25
  • @ArtemS.Tashkinov, thanks for the input, very constructive m8
    – ESilva
    Jul 15, 2021 at 20:37

1 Answer 1

2

I found a solution! I simply had to convert the files to UTF-8, they where in ISO-8859.

To see the file's current encoding: file <path-to-file> Then, to convert said file to UTF-8: iconv -f ISO-8859-15 -t UTF-8 >> <path-to-converted-file>

This should fix the 'problem';

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .