2

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?

klew
  • 723
  • 2
  • 11
  • 16

1 Answers1

2

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:

export LANG="en_US.UTF-8"
Khaled
  • 36,533
  • 8
  • 72
  • 99
  • I've already tried this and it is not working. – klew Nov 30 '10 at 12:10
  • I've just tried it again and now it is working. When I edited my files with motd there was no accecnt characters at all (it is strange, because I was writing motd with them several times). I added them and now it works. Thanks for your answer! – klew Dec 02 '10 at 17:19