When I'm editing this file in Python I'm getting error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 2882: invalid continuation byte.
Code: Select all
# file -i /etc/csf/csf.deny
/etc/csf/csf.deny: text/plain; charset=unknown-8bit
# find . -type f -print | xargs file | grep deny
./csf.deny: Non-ISO extended-ASCII text
- Can CSF encode file in some standard UTF-8?
- It is possible to disable logging country into csf.deny file. Because this could be a problem with encoding ex: # lfd: (imapd) Failed IMAP login from xx.xx.xx.xx (PL/Poland/West Pomerania/SÅ<82>awno/-): 20 in the last 300 secs - Tue Dec 28 12:04:13 2021
- Any other solutions to fix problem with charset encoding?