How to change from UTF-8 to ISO-8859?
Posted: Wed Jan 23, 2013 7:09 pm
How can I change my locale to use ISO-8859-1 instead of the default UTF-8?
OS: Linux Mint 14 (XFCE), 64-bit
OS: Linux Mint 14 (XFCE), 64-bit
Welcome to the Linux Mint forums!
https://forums.linuxmint.com/
System Tools > System Settings > Language Supportioctlvoid wrote:How can I change my locale to use ISO-8859-1 instead of the default UTF-8?
OS: Linux Mint 14 (XFCE), 64-bit
This can't possibly be right.TehGhodTrole wrote:System Tools > System Settings > Language Supportioctlvoid wrote:How can I change my locale to use ISO-8859-1 instead of the default UTF-8?
OS: Linux Mint 14 (XFCE), 64-bit
Code: Select all
gksudo gedit /var/lib/locales/supported.d/local
Code: Select all
en_US.ISO-8859-1 ISO-8859-1
Code: Select all
sudo dpkg-reconfigure locales
Code: Select all
gksudo gedit /etc/default/locale
Code: Select all
LANG="en_US.ISO-8859-1"
Thanks, this actually worked.xenopeek wrote:I don't recommend doing this, as UTF-8 supports all characters from ISO-8859-1, but not the other way around. You may end up with garbage characters: http://unix.stackexchange.com/questions ... -terminal/. I'll outline the steps below, but I urge you to also share why you want to do this as there may be a better way without dropping UTF-8, which is recommend to be used on Linux these days.
Edit your /var/lib/locales/supported.d/local file as root:Add a line for each language you want with ISO-8859-1, for example for en_US you would add:Code: Select all
gksudo gedit /var/lib/locales/supported.d/local
Enable the new encodings:Code: Select all
en_US.ISO-8859-1 ISO-8859-1
Finally, edit your /etc/default/locale file as root and set your preferences there:Code: Select all
sudo dpkg-reconfigure locales
For the above example, I would set:Code: Select all
gksudo gedit /etc/default/locale
If you have any LC_ variable defined in your /etc/default/locale, you would update these also. Reboot to activate. To undo the changes you did, just revert your /etc/default/locale to its previous setting (probably LANG="en_US.UTF-8").Code: Select all
LANG="en_US.ISO-8859-1"
Again, I urge you to reconsider this course of action. If you have some text files in ISO-8859-1 format for example, you can use the Linux recode command to convert between character sets (converting the files to UTF-8 format).
Code: Select all
LANG="en_US.ISO-8859-1" command
Code: Select all
ssh username@remotehost.tld
Code: Select all
LANG="en_US.ISO-8859-1" ssh username@remotehost.tld