How to change default code page from UTF-8 to CP-1251 ?

OPENSUSE11.3. install all default.
at this time - codepage=UTF-8

How i can change to CP1251 ?

Serg

With yast: System → Language → Details

Works ok when you do it very early after a fresh install as long as there are no filenames and other stuff around encoded in UTF-8. And it has some side effects on certain apps like MySQL, TeX …

I`m do this in the text-console. And can not found - where select codepage in the “Details”.

Serg

skoltogyan wrote:
> How i can change to CP1251 ?

what are you trying to do? i ask because “codepage 1251” is only
another way of saying “Windows Cyrillic (Slavic)” and as a Windows
code page it is not going to make the entire system use cyrillic…

i mean, if you are getting what you want as a system language, but
can’t read russian in (say) Firefox that is one thing…but, if your
entire system is giving you english, then that is another…

exactly what are you trying to ‘fix’ which is not giving you what you
need? is it one or two apps, or everything? have you used YaST to set
system language to what you want?


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
I feel annoyed that I can’t put my wide range of languages on stupid
Facebook. For example, I speak Sarcasm, fluently spoken and written,
and Various Forms of Geek…

skoltogyan wrote:
> I`m do this in the text-console. And can not found - where select

codepage in the “Details”.

try: in a terminal switch to root with “su -” then type and enter


yast

a text mode (ncurses) version of YaST should pop up, then go (using
the Tab and arrow keys) to

system (on left) language (on right) then enter and you should see
ways to select your “Primary Language”…

and, once that is done you can tab/enter to have your keyboard layout
and time zone automatically switch to the language you have selected
(but, i have NO idea with of many time zones it might pick if you
select Russian)

then, Tab to Accept and enter (and cross your fingers)

ok?


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
I feel annoyed that I can’t put my wide range of languages on stupid
Facebook. For example, I speak Sarcasm, fluently spoken and written,
and Various Forms of Geek…

I would like to ask something related too. I’ve been trying for years to have a set of locale that would be compatible with windows. See, when I type something : say a tex document or a matlab m code in linux at home, and I try to open it at school, the accentuated letters are not recognized properly. Or the biggest problem is when I browse to a remote folder : some file are reported as non existent because they have accents.

So my question is how do I tell the system to autodetect the proper locale ? Is it possible to set that at install time ?

Look.

  1. sudo su
  2. locale

LANG=ru_RU.UTF-8
LC_CTYPE=“ru_RU.UTF-8”
LC_NUMERIC=“ru_RU.UTF-8”
LC_TIME=“ru_RU.UTF-8”
LC_COLLATE=“ru_RU.UTF-8”
LC_MONETARY=“ru_RU.UTF-8”
LC_MESSAGES=“ru_RU.UTF-8”
LC_PAPER=“ru_RU.UTF-8”
LC_NAME=“ru_RU.UTF-8”
LC_ADDRESS=“ru_RU.UTF-8”
LC_TELEPHONE=“ru_RU.UTF-8”
LC_MEASUREMENT=“ru_RU.UTF-8”
LC_IDENTIFICATION=“ru_RU.UTF-8”
LC_ALL=
on the my opensuse use vsftpd.
Clients - Windows_xp_russian (win1251 codepage).
When this cleint put files with russian names (win1251) to the vsftpd - in the linux stored file with broken name !!

If change in the opensuse from ru_RU.UTF-8 to ru_RU.WIN1251 this problem will be resolved…
But im dont understand - how do this.

Serg

The problem here is the Windows systems that are involved. Those so called “code pages” are no standard at all. And even when you would use the ISO 8859 standard code pages you would have problems (they overlap, a character can not be interpreted without knowing which “code page” is used and that knowledge is not part of the encoding). The only thing that works for all characters is Unicode. And that is nowadays most often encoded in UTF-8. In Linux this is not only used in documents where you can often change to another (ISO) encoding, but down to the file names. In Linux you can have file names with Cyrilic and Devanagri characters in one directory (even in one fiilename) because they are al unique. As soon as you have such filenames that go beyond the good old ASCII range, that file system is more or less bound to UTF-8 encoded Unicode. You can not go back.

II may also point to the fact that the word “language” is often used nstead of “character set”. Thus when one says: “setting to Russian”, one often means: “setting to Cyrillic”, which is of coursee not the same.

If change in the opensuse from ru_RU.UTF-8 to ru_RU.WIN1251 this problem will be resolved…
.
I doubt if this is possible (but I am not sure), WIN1251 is proprietery stuff from MS and does not answer to any open standard.

BTW you can ftp the CONTENTS of your files back and forward to your Linux FTP server by doing it “binary”. This will change not a bit in the file. For filenames this is of course different. I would think this must be an option of the FTP CLIENT (yes, in your Windows system) to change all the data that goes through the FTP protocol to and from the server from the local proprietery encosing into the standard Unicode/UTF-8 encoding and back.

In other words: it is not the Linux server that misses something, but the Windows client.

This is from real life : If use in the liunux with vsftp - ru_RU.WIN1251 … all will be OK when put files with RUSSIAN names from the XP_russian to the vsftpd…

skoltogyan wrote:
> This is from real life : If use in the liunux with vsftp -
> ru_RU.WIN1251 … all will be OK…

the way i would solve it is to not allow any MS on the network…
it puts the whole network at risk…

i read somewhere in these fora <http://tinyurl.com/2ezdshr> that Putin
has declared the government will go to a pure open source solution
within four years…and, i think that is very smart!

so, dump your M$ and your Windows code page problem will be
history…until you can get that done REQUIRE your users to use ascii
only for directory/filenames…

problem disappears…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
I feel annoyed that I can’t put my wide range of languages on stupid
Facebook. For example, I speak Sarcasm, fluently spoken and written,
and Various Forms of Geek…

On 2010-12-28 12:36, skoltogyan wrote:
>
> This is from real life : If use in the liunux with vsftp -
> ru_RU.WIN1251 … all will be OK when put files with RUSSIAN names from
> the XP_russian to the vsftpd…

No, it will not. You will have a new set of big problems.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)