How can I change the default codepage/charset on a linux system from latin1 to utf8? I need to do this on two systems, one is running Ubuntu and the other Debian.
Asked
Active
Viewed 3.2k times
2 Answers
8
Edit /var/lib/locales/supported.d/local and add your locale to the list of supported locales if it isn't there already, eg:
en_US UTF-8
Regenerate the supported locales on your machine:
sudo dpkg-reconfigure locales
Open /etc/default/locale and check if LANG and LANGUAGE are changed:
LANG="en_US" LANGUAGE="en_US:UTF-8"
if they are not, you can manually update them now.
reboot.
0
If you also need to switch latin1 encoded filenames to utf-8, use convmv (apt-get install convmv):
convmv -f latin1 -t utf8 -r /path/to/files
This will only show what it would do. Add the --no-test option to actually do it.
mivk
- 4,015