New answers tagged

1

I found the solution and I'll leave the answer here, as it might be useful for other people who have the same problem. Open the text file using different encoding! For me (Polish language), it was CP1250 (Central European). To do this, open gedit, select "Open" option and find the neeeded file. Then choose the character encoding (bottom left side) and pick "...


4

The standard 8-bit encoding for Polish is latin2 a.k.a. ISO 8859-2. The text with ³ for ł, ¿ for ż etc. is the result of interpreting a sequence of bytes that represent text in latin2 as if they represented latin1. Latin1 a.k.a. ISO 8859-1 is the standard encoding for most West European languages. If the text is encoded in latin2, then you need to convert ...


4

head or tail will not fix/change the character. What probably happens is that gedit tries to guess the encoding of the file based on the first few bytes. When that 0xD4 is far within the file, gedit guesses the file is in ASCII or UTF-8 and complains when it sees that 0xD4 byte that is invalid in either ASCII or UTF-8. While for the second shorter file, ...


0

I fought with this today aswell. In my case the problem was with german letters like "ä,ö,ü"... I fixed it by setting ALL my language settings to UTF-8. You can see a tutorial here: https://perlgeek.de/en/article/set-up-a-clean-utf8-environment


4

The â is an artifact of using UTF-8 characters without handling them properly. That's the first byte of multiple bytes in a UTF-8 character. If the terminal is setup to know about UTF-8, it combines those bytes on the screen so you can read it. You can fix this for PuTTY by setting the translation to UTF-8. Further reading: 4.10.1 Controlling character ...



Top 50 recent answers are included