LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Slackware (http://www.linuxquestions.org/questions/forumdisplay.php?f=14)
-   -   Change between UTF-8 and ISO-8859 without rebooting? (http://www.linuxquestions.org/questions/showthread.php?t=4175446505)

malloc 01-20-2013 06:51 PM

Change between UTF-8 and ISO-8859 without rebooting?
 
I want to be able to change between UTF-8 and ISO-8859 without rebooting or restarting X, how can I do that?

I've tried to just export LANG but that doesn't do it.

iceflatline 01-20-2013 07:22 PM

In Debian I use
Code:

sudo env LANG=<whatever>
.

wildwizard 01-20-2013 09:15 PM

The problem is the environment is read in during a programs start up routine so if you change the environment it will only effect applications that start after that point.

Applications that are already running will have no way of knowing that it has changed unless they have a way of rereading the environment.

Didier Spaier 01-21-2013 01:57 AM

Sorry to be slightly off topic, but out of curiosity where does the need of setting up LANG to ISO-8859-<suffix> comes from nowadays?

If you want to import/export files using such encoding, you can use iconv to make the trans coding.

guanx 01-21-2013 06:00 AM

Quote:

Originally Posted by malloc (Post 4874339)
I want to be able to change between UTF-8 and ISO-8859 without rebooting or restarting X, how can I do that?

I've tried to just export LANG but that doesn't do it.

There are also the LC_* and the LANGUAGE env vars. Check with the output of the "locale" command.

guanx 01-21-2013 06:01 AM

Quote:

Originally Posted by iceflatline (Post 4874354)
In Debian I use
Code:

sudo env LANG=<whatever>
.

I'm not falimiar with Debian users but for Slackwarer it's not necessary to prefix every command with sudo.

malloc 01-21-2013 05:37 PM

Quote:

Originally Posted by guanx (Post 4874613)
There are also the LC_* and the LANGUAGE env vars. Check with the output of the "locale" command.

I actually tried LC_ALL too, LANGUAGE is not set, and what is locale supposed to do besides getting information?

Didier Spaier 01-22-2013 12:44 AM

Quote:

Originally Posted by malloc (Post 4874962)
I actually tried LC_ALL too, LANGUAGE is not set, and what is locale supposed to do besides getting information?

Only to clarify things a bit, you could read parts 7. Locale and 8.2 Internationalization Variables of the POSIX standard. The locale command's purpose is to get locale-specific information, it does not set anything. The LANGUAGE variable is a gettext's extension, only intended to specify a priority list of languages.

Someone could maybe give you more hints if you say specifically for which application(s)/file(s) you want to change the character encoding.


All times are GMT -5. The time now is 02:43 PM.