LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-20-2013, 06:51 PM   #1
malloc
Member
 
Registered: Jul 2010
Posts: 111

Rep: Reputation: 4
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.
 
Old 01-20-2013, 07:22 PM   #2
iceflatline
LQ Newbie
 
Registered: Aug 2009
Distribution: many
Posts: 16

Rep: Reputation: 2
In Debian I use
Code:
sudo env LANG=<whatever>
.
 
Old 01-20-2013, 09:15 PM   #3
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
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.
 
Old 01-21-2013, 01:57 AM   #4
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,037

Rep: Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974
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.
 
Old 01-21-2013, 06:00 AM   #5
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by malloc View Post
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.
 
Old 01-21-2013, 06:01 AM   #6
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by iceflatline View Post
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.
 
Old 01-21-2013, 05:37 PM   #7
malloc
Member
 
Registered: Jul 2010
Posts: 111

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by guanx View Post
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?
 
Old 01-22-2013, 12:44 AM   #8
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,037

Rep: Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974
Quote:
Originally Posted by malloc View Post
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.

Last edited by Didier Spaier; 01-22-2013 at 12:55 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iconv us-ascii to UTF-8 or ISO-8859-15 m4rtin Linux - Software 2 02-18-2009 07:34 PM
How to change character sets from iso-8859-1 to UTF-8? okos Slackware 8 06-26-2008 03:18 PM
How to switch from ISO-latin1( 8859-1) to UTF-8 and reciprocally? xpucto Linux - Newbie 3 05-17-2008 04:50 PM
im getting UTF-8 to STRING: Could not open converter from 'UTF-8' to 'ISO-8859-1' jabka Linux - Newbie 2 11-24-2006 05:44 AM
Problem with UTF-8 and ISO-8859-1 dasenjo Linux - Software 0 06-22-2003 12:14 AM


All times are GMT -5. The time now is 08:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration