Linux. utf8.

[root@pandora ~]# luit -list | grep 866 

It does not give us anything, but it is necessary that the encoding be 866 How to teach luit to understand it?

ps xorg-x11-apps last worth it. CentOS 5.6

UPD

Well, I, in general, did everything. Now I will explain. In order to go to the Windows console with linux, you need to have cp866 support in the console.

So, we need to patch luit (this is a tool that background converts a stream from an alien locale into the current one) so that it understands cp866 . I have a CentOS 5.x , made for it.

What I've done.

  1. I made sure that I do not have such a locale. -A locale -a | grep 866 locale -a | grep 866

  2. Checked that charmaps for 866 is present ll /usr/share/i18n/charmaps/IBM866.gz

  3. Created IBM866 locale. localedef -i ru_RU -f IBM866 ru_RU.IBM866 . preparation is complete, now you need to patch luit

I downloaded the xorg-x11-apps.src.rpm , deployed and found the luitа archive in the sources, deployed it and found the charset.c file charset.c .

In it, in the description of the array:

  FontencCharsetRec fontencCharsets[] = { 

Added line:

 {"IBM866", T_128, 0, "ibm-cp866", 0x80, 0, 0} 

Then in the description

 LocaleCharsetRec localeCharsets[] = { 

Added by

 { "ibm866", 0, 2, "ASCII", NULL, "IBM866", NULL, NULL} 

I saved the luit tree itself, recompiled it into a new rpm, installed it and got it fixed and a working set.

This is how it looks now: win2lin http://dl.dropbox.com/u/66475831/Sites/inet/luit.gif

  • Please take your decision in a separate answer. - Timofei Bondarev

1 answer 1

The problem described in the question is very outdated.

already luit was edited:

2011/10/30

There are also charts (it can be used ) for each locale-charset table (it can be used ).

so, if you have an older version in your distribution, you can download and compile the current version.