Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unicode trouble
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
outs
n00b
n00b


Joined: 01 May 2005
Posts: 23
Location: Russian Federation, Samara

PostPosted: Tue May 10, 2005 6:37 am    Post subject: unicode trouble Reply with quote

перевёл систему на юникод
пока обнаружены следующие проблемы:

кракозябры в сообщениях от nano и подписях к его сочитаниям клавиш

кракозябры в ссылках links


на юникод переходил согласно wiki
Back to top
View user's profile Send private message
outs
n00b
n00b


Joined: 01 May 2005
Posts: 23
Location: Russian Federation, Samara

PostPosted: Tue May 10, 2005 7:36 am    Post subject: добавление Reply with quote

при запуске links в режиме обычного пользователя русские буквы не отображаются совсем
Back to top
View user's profile Send private message
viy
Veteran
Veteran


Joined: 03 Jul 2004
Posts: 1580
Location: Riga, Latvia

PostPosted: Tue May 10, 2005 8:21 am    Post subject: Reply with quote

Надо бы уточнить:
- эти симптомы проявляются в Хах или в текстовой консоли? (заодно и конфиги того/сего покажи);
- nano собран с флажком NLS?

У меня есть подозрение, что проблемы в используемых шрифтах.
Back to top
View user's profile Send private message
outs
n00b
n00b


Joined: 01 May 2005
Posts: 23
Location: Russian Federation, Samara

PostPosted: Tue May 10, 2005 9:15 am    Post subject: Reply with quote

флажок nls в в make.conf USE установлен, так же как и unicode

шрифт terminus

всё это в консоли,
про иксы не знаю так как отсутствуют

какие именно файлы показать?
Back to top
View user's profile Send private message
viy
Veteran
Veteran


Joined: 03 Jul 2004
Posts: 1580
Location: Riga, Latvia

PostPosted: Tue May 10, 2005 9:21 am    Post subject: Reply with quote

1) вывод `locale`;
2) поясни, как и что ты настраивал для utf-8: какие файлы правил, что пересобирал, в какой последовательности.
Back to top
View user's profile Send private message
Balancer
Guru
Guru


Joined: 04 Jun 2004
Posts: 465

PostPosted: Tue May 10, 2005 9:39 am    Post subject: Непонятные проблемы с unicode :-/ Reply with quote

Сразу отмечу, что это у меня уже четвёртая машина с UTF-8 на Gentoo и на предыдущих с русским в консоли проблем не было, а сейчас - вся "UTFикация" работает исправно, кроме отображения в консоли в текстмоде. В терминалке в иксах - всё ок. А в текстовых консолях вместо юникодных символов выводятся двойные обычные кракозябры.

Все пакеты собраны и пересобраны с флагами unicode utf8 nls userlocales.

rc.conf:
Code:

KEYMAP="-u ru4"
KEYMAP_ENCODING="UTF-8"

SET_WINDOWKEYS="yes"

EXTENDED_KEYMAPS=

CONSOLEFONT="ter-k14n"

CLOCK="local"

EDITOR="/bin/nano"

PROTOCOLS="1 2"

DISPLAYMANAGER="kdm"

XSESSION="enlightenment"

UNICODE="yes"
UTF8="yes"


/etc/env.d/02locales
Code:

LC_ALL=""
LANG="ru_RU.UTF-8"


locales.build
Code:

POSIX
en_US
en_US.UTF-8/UTF-8
ru_RU
ru_RU.UTF-8/UTF-8


Все версии всех пакетов - последние.

Я уже даже и не знаю, куда дальше копать ;-/
Back to top
View user's profile Send private message
outs
n00b
n00b


Joined: 01 May 2005
Posts: 23
Location: Russian Federation, Samara

PostPosted: Tue May 10, 2005 9:46 am    Post subject: Reply with quote

consolefont >>

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/consolefont,v 1.23 2004/04/21 17:09:18 vapier Exp $

depend() {
need localmount
after hotplug
}

start() {
local x=
local param=
local sf_param=
local retval=1

if [ -n "${CONSOLEFONT}" ]
then
# Getting additional parameters, ie consoletranslation
if [ -n "${CONSOLETRANSLATION}" ]
then
param="-m ${CONSOLETRANSLATION}"
fi

# Actually setting font
if [ -x /bin/setfont ]
then
ebegin "Setting user font"

# We patched setfont to have --tty support ...
if [ -n "`setfont --help 2>&1 | grep -e '--tty'`" -o \
-n "`setfont --help 2>&1 | grep -e '-C'`" ]
then
if [ -n "`setfont --help 2>&1 | grep -e '--tty'`" ]
then
sf_param="--tty="
else
sf_param="-C "
fi

for x in $(seq 1 "${RC_TTY_NUMBER}")
do
# Using DEVFS ?
if [ -e /dev/.devfsd ] || \
[ -e /dev/.udev -a -d /dev/vc ]
then
/bin/setfont ${CONSOLEFONT} ${param} \
${sf_param}/dev/vc/${x} >/dev/null
retval=$?
else
/bin/setfont ${CONSOLEFONT} ${param} \
${sf_param}/dev/tty${x} >/dev/null
retval=$?
fi
done
else
/bin/setfont ${CONSOLEFONT} ${param} >/dev/null
retval=$?
fi
else
# No console program installed!
eend 1 "The setfont executable was not found"
return 1
fi

if [ "${retval}" -eq 0 ]
then
loc_switch="\033(K"
if [ -n "${UTF8}" ] && [ "${UTF8}" == "yes" ]
then
loc_switch="\033%G"
fi

for x in $(seq 1 "${RC_TTY_NUMBER}")
do
# Using DEVFS ?
if [ -e /dev/.devfsd ] || \
[ -e /dev/.udev -a -d /dev/vc ]
then
echo -ne ${loc_switch} >/dev/vc/${x}
else
echo -ne ${loc_switch} >/dev/tty${x}
fi
done
fi

eend ${retval} "Failed to set user font"
else
ebegin "Using the default console font"
eend 0
fi

return ${retval}
}


# vim:ts=4


keymaps >>

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/keymaps,v 1.20 2004/04/21 17:09:18 vapier Exp $

depend() {
need localmount
}

checkconfig() {
if [ -z "${KEYMAP}" ]
then
eerror "You need to setup \$KEYMAP in /etc/rc.conf first"
return 1
fi
}

start() {
local WINDOWKEYS_KEYMAP=

checkconfig || return 1

# Force linux keycodes for PPC ...
if [ -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes ]
then
echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
fi

ebegin "Loading key mappings"

# Enable unicode ...
set -- ${KEYMAP}
if [ "$1" = "-u" ]
then
/usr/bin/kbd_mode -u
KEYMAP="${KEYMAP/-u}"
fi

# New kbd support ...
if [ -x /bin/loadkeys ]
then
[ "${SET_WINDOWKEYS}" = "yes" ] && WINDOWKEYS_KEYMAP="windowkeys"

/bin/loadkeys -q ${WINDOWKEYS_KEYMAP} ${KEYMAP} \
${EXTENDED_KEYMAPS} >/dev/null

if [ -n "${KEYMAP_ENCODING}" ]
then
dumpkeys -c "${KEYMAP_ENCODING}" | loadkeys -u > /dev/null
fi
else
eend 1 "loadkeys executable not found"
return 1
fi
eend $? "Error loading key mappings"
}


# vim:ts=4

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=


rc.conf >>

# /etc/rc.conf: Global startup script configuration settings
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/rc.conf,v 1.22 2003/10/21 06:09:42 vapier Exp $

# Use KEYMAP to specify the default console keymap. There is a complete tree
# of keymaps in /usr/share/keymaps to choose from. This setting is used by the
# /etc/init.d/keymaps script.

KEYMAP="-u ru4"

# If you want to use in UTF locale a keymap created for different locale then it
# needs to be converted. Set this variable to value of the encding fo desired keymap.
KEYMAP_ENCODING="KOI8-R"


# Set this variable to "yes" if you are using UTF-8 locale.
UTF8="yes"


# Set this variable to "yes" if you are using UTF-8 locale.
UTF8="yes"

# Should we first load the 'windowkeys' console keymap? Most x86 users will
# say "yes" here. Note that non-x86 users should leave it as "no".

SET_WINDOWKEYS="no"

# The maps to load for extended keyboards. Most users will leave this as is.

EXTENDED_KEYMAPS=
#EXTENDED_KEYMAPS="backspace keypad"

# CONSOLEFONT specifies the default font that you'd like Linux to use on the
# console. You can find a good selection of fonts in /usr/share/consolefonts;
# you shouldn't specify the trailing ".psf.gz", just the font name below.
# To use the default console font, comment out the CONSOLEFONT setting below.
# This setting is used by the /etc/init.d/consolefont script (NOTE: if you do
# not want to use it, run "rc-update del consolefont" as root).

CONSOLEFONT="ter-k14n"
UNICODE="yes"

# CONSOLETRANSALTION is the charset map file to use. Leave commented to use
# the default one. Have a look in /usr/share/consoletrans for a selection of
# map files you can use.

#CONSOLETRANSLATION="8859-1_to_uni"

# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time). If your clock is set to the local time, then set CLOCK
# to "local". This setting is used by the /etc/init.d/clock script.

CLOCK="local"

# Set EDITOR to your preferred editor.

EDITOR="/bin/nano"
#EDITOR="/usr/bin/vim"
#EDITOR="/usr/bin/emacs"

# Set PROTOCOLS to the protocols that you plan to use. Gentoo Linux will only
# enable module auto-loading for these protocols, eliminating annoying module
# not found errors.
#
# NOTE: Do NOT uncomment the next lines, but add them to 'PROTOCOLS=...' line!!
#
# Num Protocol
# 1: Unix
# 2: IPv4
# 3: Amateur Radio AX.25
# 4: IPX
# 5: DDP / appletalk
# 6: Amateur Radio NET/ROM
# 9: X.25
# 10: IPv6
# 11: ROSE / Amateur Radio X.25 PLP
# 19: Acorn Econet

# Most users want this:
PROTOCOLS="1 2"

#For IPv6 support:
#PROTOCOLS="1 2 10"

# What display manager do you use ? [ xdm | gdm | kdm | entrance ]
#DISPLAYMANAGER="xdm"

# XSESSION is a new variable to control what window manager to start
# default with X if run with xdm, startx or xinit. The default behavior
# is to look in /etc/X11/Sessions/ and run the script in matching the
# value that XSESSION is set to. The support scripts is smart enouth to
# look in all bin directories if it cant find a match in /etc/X11/Sessions/,
# so setting it to "enligtenment" can also work. This is basically used
# as a way for the system admin to configure a default system wide WM,
# allthough it will work if the user export XSESSION in his .bash_profile, etc.
#
# NOTE: 1) this behaviour is overridden when a ~/.xinitrc exists, and startx
# is called.
# 2) even if a ~/.xsession exist, if XSESSION can be resolved, it will
# be executed rather than ~/.xsession, else KDM breaks ...
#
# Defaults depending on what you install currently include:
#
# Gnome - will start gnome-session
# kde-<version> - will start startkde (ex: kde-3.0.2)
# Xsession - will start a terminal and a few other nice apps

#XSESSION="Gnome"

делал всё согласно http://ru.gentoo-wiki.com/HOWTO_ru_RU.utf8_Gentoo_way
Back to top
View user's profile Send private message
viy
Veteran
Veteran


Joined: 03 Jul 2004
Posts: 1580
Location: Riga, Latvia

PostPosted: Tue May 10, 2005 10:25 am    Post subject: Reply with quote

Какая версия baselayout?
Конкретно интересует, есть ли изменения для UTF-8 в файлах /etc/init.d/keymaps и /etc/init.d/consolefont (детальней тут).
Back to top
View user's profile Send private message
Balancer
Guru
Guru


Joined: 04 Jun 2004
Posts: 465

PostPosted: Tue May 10, 2005 10:42 am    Post subject: Reply with quote

viy wrote:
(детальней тут).


Блин ;-/ Помогло
Code:

--- /etc/init.d/consolefont.orig2004-06-27 19:22:42.000000000 +0300
+++ /etc/init.d/consolefont2004-06-27 19:49:31.000000000 +0300
@@ -65,15 +65,21 @@
 
 if [ "${retval}" -eq 0 ]
 then
+loc_switch="\033(K"
+if [ -n "${UTF8}" ] && [ "${UTF8}" == "yes" ]
+then
+loc_switch="\033%G"
+fi
+
 for x in $(seq 1 "${RC_TTY_NUMBER}")
 do
 # Using DEVFS ?
 if [ -e /dev/.devfsd ] || \
    [ -e /dev/.udev -a -d /dev/vc ]
 then
-echo -ne "\033(K" >/dev/vc/${x}
+echo -ne ${loc_switch} >/dev/vc/${x}
 else
-echo -ne "\033(K" >/dev/tty${x}
+echo -ne ${loc_switch} >/dev/tty${x}
 fi
 done
 fi


Это при том, что на двух последних сборках править consolefonts не требовалось. Они что, в Gentoo откат изменений сделали? :-/
Back to top
View user's profile Send private message
viy
Veteran
Veteran


Joined: 03 Jul 2004
Posts: 1580
Location: Riga, Latvia

PostPosted: Tue May 10, 2005 11:13 am    Post subject: Reply with quote

Если ты ставишь baselayout с ACCEPT_KEYWORDS=~x86 (или другим макаром ~x86 ставишь), то собирается+ставится 1.11.* ветка baselayout'а, в которую уже включены те изменения, что с упомянутым патчем приходят.
Back to top
View user's profile Send private message
outs
n00b
n00b


Joined: 01 May 2005
Posts: 23
Location: Russian Federation, Samara

PostPosted: Tue May 10, 2005 4:59 pm    Post subject: Reply with quote

решилась проблема с запуском links из-под пользователя - указанием опции utf-8 i/o

остались не решённой проблемы отображения имён файлов в нтфс в статус-баре links - отображается псевдографика пополам с русскими буквами

также не отображаются имена файлов по русски в нтфс из-под elinks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum