How can I change my locale to use ISO-8859-1 instead of the default UTF-8?
OS: Linux Mint 14 (XFCE), 64-bit

ioctlvoid 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



TehGhodTrole wrote:ioctlvoid 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
System Tools > System Settings > Language Support

gksudo gedit /var/lib/locales/supported.d/localen_US.ISO-8859-1 ISO-8859-1sudo dpkg-reconfigure localesgksudo gedit /etc/default/localeLANG="en_US.ISO-8859-1"


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:
- Code: Select all
gksudo gedit /var/lib/locales/supported.d/local
Add a line for each language you want with ISO-8859-1, for example for en_US you would add:
- Code: Select all
en_US.ISO-8859-1 ISO-8859-1
Enable the new encodings:
- Code: Select all
sudo dpkg-reconfigure locales
Finally, edit your /etc/default/locale file as root and set your preferences there:
- Code: Select all
gksudo gedit /etc/default/locale
For the above example, I would set:
- Code: Select all
LANG="en_US.ISO-8859-1"
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").
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).

LANG="en_US.ISO-8859-1" commandssh username@remotehost.tldLANG="en_US.ISO-8859-1" ssh username@remotehost.tld


Users browsing this forum: johnm70 and 16 guests