File csf.deny is Non-ISO extended-ASCII text
Posted: 30 Dec 2021, 07:22
I have problem with coding in file /etc/csf/csf.deny.
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.
So my questions:
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?