New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log encoding=auto ends up being ANSI_X3.4-1968 #1587
Comments
Logged in as root: $ python3
Python 3.4.2 (default, Oct 8 2014, 10:45:20)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> print(locale.getpreferredencoding())
UTF-8 |
No idea why... |
I have not backported 0.9.6.
|
recidive only? |
Excuse me.
|
Could you provide results of: python -c "from fail2ban.server.filter import Filter; f = Filter(None); print(f.getLogEncoding())" fail2ban-client -d | grep -E "(recidive|apache).*encoding" No idea about default encoding by services starting via SysVinit, but I think it not matters normally, and should use the system encoding (at least I've never seen something others). |
Here it is
|
Excuse me, Fail2ban runs on Python 3
|
This is the env of /usr/bin/fail2ban-server
|
But 😄
|
But I think on the terminal it comes from And fail2ban-server has no such env variable. |
IMHO the debian way is to set locale as And corresponding this man sysvinit-utils/service.8, service should pass What did you have in Check the locales are installed and select system locale via ?sudo? apt-get install locales
?sudo? dpkg-reconfigure locales Which env has your init process? ( |
/etc/environment is empty as in all Debian |
Fixed on the code-level in #1868, but ... Note: Notwithstanding, this fixes many encoding problems, would be a good idea correctly set all expected environment variables for fail2ban daemon in init- resp. systemd-scripts or server configuration. |
Fail2ban v0.9.5 is started by SysVinit.
Should I add
LC_ALL="en_US.UTF-8"
to/etc/defaults/fail2ban
to set auto logencoding to UTF-8?The Debian system locale is
en_US.UTF-8
.Please advise.
The text was updated successfully, but these errors were encountered: