LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-13-2008, 11:29 AM   #1
compiler
LQ Newbie
 
Registered: Jan 2008
Distribution: xubuntu
Posts: 8

Rep: Reputation: 0
Unhappy new locale whith other encoding


Hi!
Im new in linux world and my question may be very easy but for me it is a real problem..
So, Im wonting set new locale in xubuntu...
now I have ru_Ru.UTF-8, but I wont change encoding in KOI8-R...
what I do for this
Code:
#localedef -c -i ru_RU -f KOI8-R ru_RU.KOI8-R
$export LANG=ru_RU.KOI8-R
after this in the terminal became locale ru_RU.KOI8-R and all programs that runs from this terminal have so locale, bat in other terminals there are old locale

what I must do? Help me please..

Last edited by compiler; 01-13-2008 at 11:30 AM.
 
Old 01-14-2008, 07:58 AM   #2
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
Probably you must change the local for all terminals. But why do you want to use KOI8 encoding at all? It is a completely outdated encoding by now and you will probably end up making yourself more problems than you are going to solve. UTF8 supports cyrillic.
 
Old 01-14-2008, 08:37 AM   #3
compiler
LQ Newbie
 
Registered: Jan 2008
Distribution: xubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Probably you must change the local for all terminals.
Yes, but how? Help me please...
Quote:
But why do you want to use KOI8 encoding at all?
I need use some programms that dont working whith UTF8 curilic...
Quote:
It is a completely outdated encoding by now and you will probably end up making yourself more problems than you are going to solve.
Its only you opinion
Quote:
UTF8 supports cyrillic.
Yes, I know, now I use UTF8 for my cyrillic text..
 
Old 01-14-2008, 10:03 AM   #4
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
Start your locale environment from within your .profile or .bashrc.

I put all my stuff into a separete file called .i18n and this file is loaded from my .bashrc with ". ~/.i18n".

In .i18n I've got: (adjust for russian, please)

export LC_CTYPE="de_DE.utf-8"
export LC_COLLATE="de_DE.utf-8"
export LANG=en_US.utf-8
export LC_PAPER="de_DE.utf-8"


That means: I want my system still talk to me in english (LANG) when it comes to error messages and stuff, but please do sorting correctly for german alphabet (COLLATE) and just to be save no character and font mess-ups (CTYPE) with german umlauts.

And please, all this encoded in UTF-8.

If you just need ONE application or terminal specifically be started within your russian environment call it from command line like this:

LANG=ru_RU.utf-8 abiword &

(Just as an example...)

Wether it's ".utf-8" or ".UTF-8" or something else depends on your settings; check with

locale -a | grep ru_RU

what you actually got. I forgot if this is case sensitive or not.
 
Old 01-14-2008, 01:16 PM   #5
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
If you only need the command line to use KOI8 encoding the KDE and GNOME ones can easily be switched. In Konsole for example: "Preferences -> Encoding -> Select your encoding" then if you want that Konsole always starts with KOI8 encoding as default "Preferences -> Save" .

I'm working on a open source jukebox, believe me, those old character encodings (includes ISO-8859 variants) make lots of mess and we get lots of user feedback because of various issues with those (ID3 tags for example).
 
Old 01-14-2008, 02:17 PM   #6
compiler
LQ Newbie
 
Registered: Jan 2008
Distribution: xubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for all, you very helped me...

ps
hansalfredche, about koi8.. Im only schoolboy(for this year)) Its my home computer, and I didn't do any real big projects(now)), but my hobby(and I hope, future profession) is programming... now I realy liking lazarus(it's grate), but it's dont work in russian mode whith out koi8 .. also there different servers that use koi8 in ssh.. so I decided change local... You say it's old but all russian linux resource use it(like linux.org.ru, opennet.ru and other). And offcouse working whitch koi8 is faster...
ps2
some time later, when utf8'll become real encoding for russians resource, I probably change my mind
 
Old 01-14-2008, 02:46 PM   #7
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
I will not start a war about which encoding is better, I'm just going to say: Globalization has also reached Russia
 
Old 01-15-2008, 05:45 AM   #8
compiler
LQ Newbie
 
Registered: Jan 2008
Distribution: xubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hansalfredche View Post
I will not start a war about which encoding is better, I'm just going to say: Globalization has also reached Russia
off course, some time later, we all will be use some unicode(probably, it will be utf8)..
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
locale: Cannot Set LC_ALL to default locale: No such file or directory. asym Linux - General 11 10-24-2018 05:54 PM
Re: Locale problem: Can't convert string from native encoding to 'UTF-8' treotan Ubuntu 1 11-14-2007 08:02 AM
Slackware 12 - Setting locale - english language, koi8-r encoding. ErV Slackware 5 07-12-2007 06:24 AM
tv-recording whith transcode and init whith v4lctl is not working with cron Goofy180173 Linux - Software 1 10-13-2006 12:54 PM
locale: Cannot set LC_ALL to default locale: Invalid argument GadgetWiz Mandriva 1 03-31-2006 11:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration