VectorLinux
October 21, 2014, 12:32:38 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1] 2
  Print  
Author Topic: Cyrillic text problem  (Read 8677 times)
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« on: May 27, 2008, 02:20:27 pm »

Hi
Well, the problem is that I didn't get them. Cyrillic filenames are shown in file manager(thunar, pcmanfm, emelfm2, mc) like this: ??.??.??.??
Also mp3 files in Cyrillic are shown in XMMS in the same way.

I installed fontfix and also tryed this.
Doesn't changed a thing.
I added russian keyboard layout, so I could type in russian, and could see russian letters in firefox and abiword, but everything else doesn't work at all.
I could see filenames of these files on windows xp, and I took these files from windows 98, so I came to a conclusion that not all fonts used by windows are supported by VectorLinux.
Could someone advise me something?
Thanks a lot in advance.

ADDED:

Don't know, maybe it has something to do with encoding... I know almost nothing about this kind of staff.
Thanks.
« Last Edit: June 04, 2008, 06:39:46 pm by budulay » Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
kukibl
Guest
« Reply #1 on: June 01, 2008, 11:35:55 am »

Maybe http://www.vectorlinux.com/forum2/index.php?topic=5526.msg37910 will be helpful!
Logged
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« Reply #2 on: June 01, 2008, 04:38:58 pm »

Quote
Well, if you want to keep US locale, but include utf-8 support do next:

-edit as root /etc/profile.d/lang.sh with your favourite editor

-comment this line with # sign

Code:

export LANG=en_US


-uncomment this line (a little below):

Code:

export LANG=en_US.UTF-8


That should solve problem for you. Wink

Else, you can set up locale for your language. Just type locale -a command, find line that suites your language and put it in edited file by replacing current setting. In example, for my language (Serbian) I would replace export LANG=en_US.UTF-8 with export LANG=sr_CS.utf8.

Thanks very much for your reply!
I am now trying to do it. will report on results.
Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« Reply #3 on: June 01, 2008, 06:06:24 pm »

I tried,
Code:
LANG=ru_RU.utf8.
and
Code:
LANG=en_US.UTF-8
but seems like it's not the problem.
There is few other cyrillic encodings, will try them now, but I'd prefer to keep US locale...
 
Cyrillic filenames still look like this:
http://img2.freeimagehosting.net/uploads/27ef62b81a.jpg
But Thank you very much for trying to help. I really appreciate it.
« Last Edit: January 25, 2009, 10:30:24 am by budulay » Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« Reply #4 on: June 02, 2008, 05:51:57 am »

Tried
Code:
export LANG=ru_RU.cp1251
and
Code:
export LANG=ru_RU.koi8r
Still had the same result.

There are many encoding in Cyrillic:
http://img2.freeimagehosting.net/uploads/412cb6fb49.jpg

Maybe some of them are disabled or absent in Vector?
If so, is there a way to add them?
Thanks a lot.
« Last Edit: January 25, 2009, 10:30:35 am by budulay » Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« Reply #5 on: June 04, 2008, 08:39:32 pm »

Searched for some help abroad - in russian Linux Forums... Found not much, yet. Their main goal is to make russian interface, but I want to keep the english's one...
anyway, that's what I found useful:
adding
Code:
unicode_start
to /etc/rc.d/rc.font (replacing the stuff that was there before)

than adding
Code:
#!/bin/sh
# Enables Unicode processing in the current console.
#
# 1. The input side: the keyboard driver.

# Set the keyboard driver in Unicode mode. (Default is ASCII mode.)
# This really does nothing with the way normal keys are handled in
# the kernel. All it does is:
# - It is necessary for `dumpkeys' in order to not drop U+XXXX
#   entries from the keymaps.
# - It is necessary for `loadkeys' in order to avoid warnings.
# - Unicode characters typed as Alt-x1 ... Alt-xn (where x1,...,xn
#   are digits on the numeric keypad) will be emitted in UTF-8.

kbd_mode -u

# Change the keyboard mapping in such a way that the non-ASCII keys
# produce UTF-8 encoded multibyte sequences, instead of single bytes
# >= 0x80 in a legacy 8-bit encoding.

dumpkeys | loadkeys --unicode

# 2. The output side: the console screen.

# Tell the console output driver that the bytes arriving are UTF-8
# encoded multibyte sequences.
for i in 1 2 3 4 5 6; do
  echo -n -e '\033%G' > /dev/tty$i
done

# Tell the graphics card how to display Unicode characters not
# contained in the IBM 437 character set (on PCs). The font should
# have a Unicode map attached, or explicitly specified, e.g.,
# by giving `def.uni' as a second argument.

#DEFAULT_UNICODE_FONT=ter-u16n
DEFAULT_UNICODE_FONT=LatArCyrHeb-16
# Also drdos8x16 is a good candidate.

case $# in
    2)
        for i in 1 2 3 4 5 6; do
            setfont $1 -u $2 -C /dev/tty$i
        done
;;
    1)
        for i in 1 2 3 4 5 6; do
            setfont $1 -C /dev/tty$i
        done
;;
    0)
        for i in 1 2 3 4 5 6; do
            setfont $DEFAULT_UNICODE_FONT -C /dev/tty$i
        done
;;
    *)
        echo "usage: unicode_start [font [unicode map]]"
;;
esac
to /usr/bin/unicode-start (again, replacing the old staff)

That gave me ability to type cyrillic in terminal(which I personally don't found wery useful - there are only english commands availible there:-) and see some of cyrillic filenames there, created in Vector (I could see them, but I have problems with files, left from my old windows 98 system) + now I could save cyrillic text in simple text formats(such as txt). before that I could only do that in complex ones(like rtf, doc, abw).
Not much, but at least something...

Also found thing that DON'T work for me:
Code:
#!/bin/sh
export LANG=en_US.UTF-8
export LC_CTYPE=ru_RU.UTF-8
export LC_NUMERIC=C
export LC_TIME=ru_RU.UTF-8
export LC_COLLATE=C
export LC_MONETARY=ru_RU.UTF-8
export LC_MESSAGES=ru_RU.UTF-8
export LC_PAPER=ru_RU.UTF-8
export LC_NAME=ru_RU.UTF-8
export LC_ADDRESS=ru_RU.UTF-8
export LC_TELEPHONE=ru_RU.UTF-8
export LC_MEASUREMENT=ru_RU.UTF-8
export LC_IDENTIFICATION=ru_RU.UTF-8
export LESSCHARSET=UTF-8

That left me with russian interface (which I, myself found really funny) and same problems as before...
Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« Reply #6 on: June 05, 2008, 11:15:16 am »

Seems like I found something:

I asked my friend from Ukraine who use windows xp(I strongly addvise him to switch to Vector. seems like he is moving in this direction) to send me *.txt files saved in different encodings. the result is:

ANSI - don't work(it's the default one, so most people use it)
Unicode - don't work
Unicode Big Endian - don't work
UTF-8 - works!!!!

1 out of 4...

Also there are:
KOI8-R
KOI8-U
ISO-8859-5
ISO-8859-14
ISO-IR-111
WIN-1251
IBM-855
CP-866
MacCyrillic
MacUkrainian

Seems like Firefox understands all these encodings(At least I tried opening files that he send me with firefox and it works perfect, 4 out of 4) and it has all of them(except for ISO-8859-14) in its encoding menu.

So here comes the question:
how to enable encodings in Vector?
Thanks in advance.

ps.
Just out of curiosity:
Why there are so many encoding for russian? isn't one enough? it brings only problems and nothing more.
« Last Edit: June 05, 2008, 11:20:02 am by budulay » Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« Reply #7 on: June 09, 2008, 02:45:51 pm »

I thought maybe the problem is that I copied these files from CD-R burned under windows...
maybe when I copied them, filenames get spoiled... So I googled a bit and found this and this
But seems like these ubuntu fixes don't work with VL...

Also there are some progress:
1) I installed microsoft fonts:
At first I installed this package - it allows to decompress fonts.
Then here comes fonts. These are Slack's packages, but they work great on VL.
I get this info from here(it is in Russian).

2) Also I added
Code:
FontPath     "/usr/X11R6/lib/X11/fonts/cyrillic/"
after
Code:
FontPath     "/usr/X11R6/lib/X11/fonts/misc/"
in my xorg.conf and replaced
Code:
Option "XkbLayout" "us,ru"
with
Code:
Option "XkbLayout" "us,ru(winkeys)"
this keymap suits more to my keyboard.

Also I eddited /etc/rc.d/rc.font
Code:
#!/bin/sh
#
# This selects your default screen font from among the ones in
# /usr/share/kbd/consolefonts.
#
unicode_start LatArCyrHeb-16
for i in 1 2 3 4 5 6;do
 echo -ne "\033%G" >/dev/tty$i
done
this should enable russian fonts in console.
and /etc/rc.d/rc.keymap
Code:
#!/bin/sh
# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then
 /usr/bin/loadkeys /usr/share/kbd/keymaps/i386/qwerty/ru-utf.map.gz
fi
This should enable cyrillic keymap in console.
also I installed mc that supports utf-8 from here.

I think that editing rc.font, rc.keymap and unicode-stat was bad idea. When X broke down(because I tried to do some bad stuff with my video card) and I had to fix it from console I noticed that there was lot of symbols like $#^%R$@^#*#%*#^% all over the screen...

3) I found this it says that it fixes bad cyrillic names in XMMS playlist. Af far it doesn't work for me, but maybe I just did something wrong...

4) Here is the program that should convert cyrillic filenames from one encoding to another. I truied it, but it doesn't seem to work... Or it even shouldn't work, if what I said at the beggining is true.
If someone had any ideas about the stuff I need to make it work - please, write it here.
Thanks in advance.



added:
found interesting page about unicode.
will explore it a little.
« Last Edit: August 24, 2008, 01:44:54 pm by budulay » Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
fuelinux
Member
*
Posts: 52



« Reply #8 on: June 21, 2008, 03:57:21 am »

Budulay,
With due respect to this forum it seems like there are not many of Cyrillic encding users here. I think it would make more reason to post about your problems (actually, I've got similar problems with cyrillic ecoding on VL, but that's not critical for me) on some russian forums. There are quite a big fans of Slack in Russia.
Oh, and if you find a solution, don't forget about us here Smiley
Logged

Vector Linux 5.8 Standard
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« Reply #9 on: July 09, 2008, 09:00:28 am »

Actually I have already done that:-) but there seems not a lot of people with my problem(bad cyrillic filenames from windows mashine)...
I found information that on Zenwalk there is no such problem at all...
Will proceade with my research when I'll be back home.
Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
VillMann
Member
*
Posts: 2


« Reply #10 on: December 14, 2008, 04:18:38 pm »

Hi,

I seem to have a similar problem. I have a lot of  russian mp3 files with filenames showing up with strange characters.

I did some research (http://ourworld.compuserve.com/homepages/paulgor/index_en.htm) and viewed my files in firefox and finally found that the filenames were encoded in CP866, which is an old DOS based encoding. The filenames were readable, but still had some extraordinary characters present.

You should try codepage CP866 and see if that helps. I'm trying to find a program that translates filennames from CP866 to the more usual cp1251 or unicode.

Have you found any solution?

Cheers, Villu
Logged
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« Reply #11 on: January 25, 2009, 10:47:16 am »

Hi Villu, sorry that I didn't noticed your post before.
Thank you very much for the information. Now it all makes perfect sence.
I couldn't see those filenames in english win98, only in russian one. That's because the russian version is the only one that supports old DOS cyrillic encoding!
I will search the web and see what I could find.
Thank you once again for your effort.
Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
VillMann
Member
*
Posts: 2


« Reply #12 on: January 25, 2009, 11:00:42 am »

You're welcome!

Let me know if you find a method of converting the filenames.
Logged
Windozer
Vectorite
***
Posts: 386


Have Vector Linux, Will Travel.


« Reply #13 on: January 25, 2009, 11:06:58 am »

Budulay,
With due respect to this forum it seems like there are not many of Cyrillic encding users here. [...]
Oh, and if you find a solution, don't forget about us here Smiley

Hi Fuelinux,

well, I'm actually trying to convince a translator friend of mine (English <-> Russian <-> German) to drop Ubuntu like - as is said in American - a hot potato, in favor of VL --- they've got Cyrillic font and keyboard issues on Ubu'

hope you can figure this one out too

ciao
Howard in Florida
(a translator too in a "past life")  Grin Grin
Logged

483,617th Registered Linux Snoozer
budulay
Packager
Vectorian
****
Posts: 568


NewComer


« Reply #14 on: January 26, 2009, 02:18:27 pm »

Actually the keyboard works fine. There are also some Cyrillic fonts present(I also have a Zenwalk's package with a whole bunch of Cyrillic fonts, so if you are interest I can put a link here). If locale is set to UTF-8, you can even create files with Cyrillic filenames or copy such files from winxp(at least that's what I tested).
The problem comes when you have files from the older species of a windows family, like win98. As VillMann pointed out, they use old DOS encoding for Cyrillic, which is not supported by VL.
I am not sure how all this support of an encoding works. Is this a VL that does not support it, or is it a file manager's fault.
There is an encoding directory somewhere in X11's stuff(sorry for such vagueness, I will post exact location as soon as I will have some time to spend on this issue), and I am thinking that is a place where the problem lies.
There is also a problem with Cyrillic mp3 filenames and tags, which I have no explanation for. There is a project called rusxmms that seems to fox that, but for a long time now I couldn't get past a title web page b/c of the lack of free time.
I will continue with this research as soon as I will have a time opening.
Thank you very much for your support and encouragement. At least now I know that I am not alone Cheesy
Logged

VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!