I've just changed default motd in Ubuntu (I edited /etc/update-motd.d/* files) and added some string in polish:
echo "Aby uzyskać dodatkowe informacje i przykładowe skrypty wpisz:"
but autogenerated /etc/motd is without accent characters:
Aby uzyska dodatkowe informacje i przykadowe skrypty wpisz:
So "ć" and "ł" is missing. So how to enable utf-8 encoding in motd?
You can use the LANG environment variable to enable UTF-8 encoding. Just edit your script file (under
/etc/update-motd.d/*
) by adding the line: