View previous topic :: View next topic |
Author |
Message |
LimeFrog Apprentice
Joined: 31 Mar 2003 Posts: 187 Location: Skövde, Sweden
|
Posted: Mon Oct 20, 2008 2:22 pm Post subject: [SOLVED] Can't get UTF-8 running |
|
|
Hi,
I've been trying to get UTF-8 running on my system following the Gentoo localization guide and the Using UTF-8 with Gentoo guide, but I seem to fail somewhere. I've tried searching the forums for answers, but I just can't seem to find any relevant thread. The problem is that even though I've followed the guides it seems that my system doesn't want to run in UTF-8 mode. I've enabled utf8 as the default NLS option and included NLS UTF8 in the kernel.
locale.gen Code: | en_US ISO-8859-1
en_US.UTF-8 UTF-8
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
sv_SE ISO-8859-1
sv_SE.UTF-8 UTF-8 | After this I ran locale-gen.
Output from locale Code: | LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL= |
I have set UNICODE="yes" in rc.conf and I'm using consolefont="lat9w-16" in consolefont and have it running at boot. I also had unicode nls in make.conf before i rebuilt my entire system.
Just to show you an example I've got a folder which should show up as l'âme_immortelle but instead I get l'âme_immortelle.
Any suggestions or tips right away? Or do you need any more info about my system configuration? _________________ I don't believe in God, but I'm afraid of him!
Last edited by LimeFrog on Mon Oct 27, 2008 8:20 am; edited 1 time in total |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Oct 20, 2008 4:02 pm Post subject: |
|
|
Hi, can you post this plz :
Code: |
# cat nano -w /mnt/gentoo/etc/conf.d/consolefont
|
Do you have this line enable :
Code: |
CONSOLETRANSLATION="8859-1_to_uni"
|
Also, do you have this inside your /etc/portage/package.use
Code: |
sys-libs/glibc userlocales
|
Do you have something inside /etc/env.d/02locales ???
When you run
what happens ? |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Oct 20, 2008 4:05 pm Post subject: |
|
|
Since it's a french directory, check mine :
Code: |
# nano -w /mnt/gentoo/etc/conf.d/consolefont
CONSOLEFONT="default8x9" et
CONSOLETRANSLATION="8859-15_to_uni"
|
Code: |
# nano -w /etc/locale.gen
fr_CA ISO-8859-1
fr_CA.UTF-8 UTF-8
|
Code: |
# nano -w /etc/env.d/02locales
LANG= "fr_CA.UTF-8"
LANGUAGE="fr_CA.UTF-8"
LC_ALL="fr_CA.UTF-8"
|
I had to run emerge -e system to have my system using fr_CA.UTF-8. |
|
Back to top |
|
|
LimeFrog Apprentice
Joined: 31 Mar 2003 Posts: 187 Location: Skövde, Sweden
|
Posted: Mon Oct 20, 2008 4:30 pm Post subject: |
|
|
Here's the output from /etc/conf.d/consolefont. Does consoletranslation need to be enabled? I figured it would use it anyways since the comment says it will fall back to defaults else why.
consolefont Code: | # 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="default8x16"
consolefont="lat9w-16"
# consoletranslation 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"
# unicodemap is the unicode map file to use. Leave commented to use the
# default one. Have a look in /usr/share/unimaps for a selection of map files
# you can use.
#unicodemap="iso01" |
I didn't have userlocales as a USE variable when I installed glibc, is it mandatory?
locale-gen Code: | S44 ~ # locale-gen
* Generating 6 locales (this might take a while) with 1 jobs
* (1/6) Generating en_US.ISO-8859-1 ... [ ok ]
* (2/6) Generating en_US.UTF-8 ... [ ok ]
* (3/6) Generating en_GB.ISO-8859-1 ... [ ok ]
* (4/6) Generating en_GB.UTF-8 ... [ ok ]
* (5/6) Generating sv_SE.ISO-8859-1 ... [ ok ]
* (6/6) Generating sv_SE.UTF-8 ... [ ok ]
* Generation complete |
I appreciate the help, just let me know if you need any more info. _________________ I don't believe in God, but I'm afraid of him! |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Oct 20, 2008 4:31 pm Post subject: |
|
|
I think that you need to enable this line : consolefont="default8x16
Also, did you run this after locale-gen ?
Code: |
# env-update && source /etc/profile
|
|
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Oct 20, 2008 4:34 pm Post subject: |
|
|
By the way, since é â are only in french, I think that you need to enable that too, with locale-gen and inside your kernel...
Code: |
(*) Native language support
(M) Base native language support
(iso8859-1) Default NLS option
(M) Codepage 437 (United States,Canada)
(M) Codepage 863 (Canadien French)
(M) NLS iso8859-1 (Latin 1: Western European Language)
(M) NLS iso8859-15 (latin 9 :Western European Language with euro
(M) NLS UTF8
|
Can you post your emerge --info by the way ? |
|
Back to top |
|
|
LimeFrog Apprentice
Joined: 31 Mar 2003 Posts: 187 Location: Skövde, Sweden
|
Posted: Tue Oct 21, 2008 6:16 am Post subject: |
|
|
Code: | S44 ~ # emerge --info
Portage 2.2_rc12 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r0, 2.6.27-gentoo i686)
=================================================================
System uname: Linux-2.6.27-gentoo-i686-AMD_Sempron-tm-_Processor_3200+-with-glibc2.0
Timestamp of tree: Thu, 16 Oct 2008 10:15:01 +0000
app-shells/bash: 3.2_p39
dev-lang/python: 2.4.4-r13, 2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc: 0.3.0-r1
sys-apps/sandbox: 1.2.18.1-r3
sys-devel/autoconf: 2.63
sys-devel/automake: 1.9.6-r2, 1.10.1-r1
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.26
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.ds.karen.hj.se/gentoo http://mirror.mdfnet.se/mirror/gentoo http://ftp.ing.umu.se/linux/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl alsa apache2 bzip2 cli cracklib crypt cups dri dvd fortran gd gdbm gnome gpm gtk iconv ipv6 isdnlog jpeg midi mp3 mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl php png pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY |
d2_racing wrote: | I think that you need to enable this line : consolefont="default8x16 | I've got the consolefont enabled in /etc/conf.d/consolefont I just chose another font.
I've also ran env-update and source /etc/profile after locale-gen.
Any other ideas? _________________ I don't believe in God, but I'm afraid of him! |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Oct 21, 2008 11:31 am Post subject: |
|
|
Did you recompile your kernel and add the fr_CA or fr_FR inside your locale.gen ? |
|
Back to top |
|
|
yngwin Retired Dev
Joined: 19 Dec 2002 Posts: 4572 Location: Suzhou, China
|
Posted: Tue Oct 21, 2008 11:53 am Post subject: |
|
|
d2_racing wrote: | By the way, since é â are only in french, I think that you need to enable that too, with locale-gen and inside your kernel... |
No, that's the whole point of unicode, it contains all the needed characters (as long as the font supports it). _________________ "Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF |
|
Back to top |
|
|
LimeFrog Apprentice
Joined: 31 Mar 2003 Posts: 187 Location: Skövde, Sweden
|
Posted: Tue Oct 21, 2008 11:56 am Post subject: |
|
|
Kernel Code: | -*- Native language support
(utf8) Default NLS Option
<*> Codepage 437 (United States, Canada)
< > Codepage 737 (Greek)
< > Codepage 775 (Baltic Rim)
<*> Codepage 850 (Europe)
< > Codepage 852 (Central/Eastern Europe)
< > Codepage 855 (Cyrillic)
< > Codepage 857 (Turkish)
< > Codepage 860 (Portuguese)
< > Codepage 861 (Icelandic)
< > Codepage 862 (Hebrew)
< > Codepage 863 (Canadian French)
< > Codepage 864 (Arabic)
< > Codepage 865 (Norwegian, Danish)
< > Codepage 866 (Cyrillic/Russian)
< > Codepage 869 (Greek)
< > Simplified Chinese charset (CP936, GB2312)
< > Traditional Chinese charset (Big5)
< > Japanese charsets (Shift-JIS, EUC-JP)
< > Korean charset (CP949, EUC-KR)
< > Thai charset (CP874, TIS-620)
< > Hebrew charsets (ISO-8859-8, CP1255)
< > Windows CP1250 (Slavic/Central European Languages)
< > Windows CP1251 (Bulgarian, Belarusian)
<*> ASCII (United States)
<*> NLS ISO 8859-1 (Latin 1; Western European Languages)
< > NLS ISO 8859-2 (Latin 2; Slavic/Central European Languages)
< > NLS ISO 8859-3 (Latin 3; Esperanto, Galician, Maltese, Turkish)
< > NLS ISO 8859-4 (Latin 4; old Baltic charset)
< > NLS ISO 8859-5 (Cyrillic)
< > NLS ISO 8859-6 (Arabic)
< > NLS ISO 8859-7 (Modern Greek)
< > NLS ISO 8859-9 (Latin 5; Turkish)
< > NLS ISO 8859-13 (Latin 7; Baltic)
< > NLS ISO 8859-14 (Latin 8; Celtic)
<*> NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)
< > NLS KOI8-R (Russian)
< > NLS KOI8-U/RU (Ukrainian, Belarusian)
<*> NLS UTF-8 | That's the NLS conf for my currently running kernel (2.6.27). _________________ I don't believe in God, but I'm afraid of him! |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Oct 21, 2008 2:09 pm Post subject: |
|
|
Everything seems to be fine inside your kernel. |
|
Back to top |
|
|
LimeFrog Apprentice
Joined: 31 Mar 2003 Posts: 187 Location: Skövde, Sweden
|
Posted: Tue Oct 21, 2008 2:13 pm Post subject: |
|
|
Yeah, that's the problem. I can't understand where I go wrong, to me everything seems correct.
Any other tips or suggestions would be most welcome. _________________ I don't believe in God, but I'm afraid of him! |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Oct 21, 2008 2:19 pm Post subject: |
|
|
Can you repost your /etc/locale.gen and /etc/env.d/02locales ?
Also, on my box, when I actived some new locales, I always rebuild my toolchain : emerge -e system
I don't know if it's related, but maybe you need to run this too, because maybe there a lot of packages that need to be recompiled to enable new locale. |
|
Back to top |
|
|
LimeFrog Apprentice
Joined: 31 Mar 2003 Posts: 187 Location: Skövde, Sweden
|
Posted: Tue Oct 21, 2008 2:25 pm Post subject: |
|
|
/etc/locale.gen Code: | # /etc/locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# <locale> <charmap>
#
# Where <locale> is a locale located in /usr/share/i18n/locales/ and
# where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
# /usr/share/i18n/SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you. After updating this file, you can simply run `locale-gen`
# yourself instead of re-emerging glibc.
en_US ISO-8859-1
en_US.UTF-8 UTF-8
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
sv_SE ISO-8859-1
sv_SE.UTF-8 UTF-8
|
/etc/env.d/02locales Code: | LANG="en_US.UTF8"
LC_COLLATE="C" |
Yeah I did an emerge -e world after I finished my current config, but I can give it another go if you think it might help. _________________ I don't believe in God, but I'm afraid of him! |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Oct 21, 2008 5:34 pm Post subject: |
|
|
Hi, I think that you need to add this :
Code: |
fr_CA ISO-8859-1
fr_CA.UTF-8 UTF-8
|
Or
Code: |
fr_FR ISO-8859-1
fr_FR.UTF-8 UTF-8
|
Inside /etc/locale.gen
If it's not working, then I suggest this :
Code: |
# emerge -e system && emerge -e world
|
You have nothing to loose to recompile your box. |
|
Back to top |
|
|
LimeFrog Apprentice
Joined: 31 Mar 2003 Posts: 187 Location: Skövde, Sweden
|
Posted: Tue Oct 21, 2008 9:23 pm Post subject: |
|
|
No offense, but I hardly think that fr_FR and fr_CA has anything to do with my problem. As yngwin kindly pointed out earlier in the thread, the whole point with UTF-8 is that all(?) characters should be supported no matter what language your system is running.
But I'm giving emerge -e world a go to see if it changes anything, although i doubt it. _________________ I don't believe in God, but I'm afraid of him! |
|
Back to top |
|
|
yngwin Retired Dev
Joined: 19 Dec 2002 Posts: 4572 Location: Suzhou, China
|
Posted: Wed Oct 22, 2008 2:26 am Post subject: Re: Can't get UTF-8 running |
|
|
LimeFrog wrote: | Just to show you an example I've got a folder which should show up as l'âme_immortelle but instead I get l'âme_immortelle. |
Where exactly are you looking that displays like this? Xterm? VT-1? _________________ "Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF |
|
Back to top |
|
|
notHerbert Advocate
Joined: 11 Mar 2008 Posts: 2228 Location: 45N 73W
|
Posted: Wed Oct 22, 2008 7:31 am Post subject: |
|
|
Mine gets l'âme_immortelle right both on VT-1 and Xterm Code: | cat /etc/conf.d/consolefont
# 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="default8x16"
# consoletranslation 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"
# unicodemap is the unicode map file to use. Leave commented to use the
# default one. Have a look in /usr/share/unimaps for a selection of map files
# you can use.
#unicodemap="iso01" |
Code: | locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8 |
Code: | grep ^CONFIG_NLS /usr/src/linux/.config
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_ASCII=m
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_UTF8=y |
Code: | cat /etc/locale.gen
en_US ISO-8859-1
en_US.UTF-8 UTF-8 |
Code: | emerge --info
...
USE="... encode iconv nls truetype unicode xft ..."
... |
Code: | cat /etc/env.d/02locale
LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8" |
|
|
Back to top |
|
|
durian Guru
Joined: 16 Jul 2003 Posts: 312 Location: Margretetorp
|
Posted: Wed Oct 22, 2008 8:48 am Post subject: |
|
|
Can it be the terminal you work in? I have an UTF-8 system, and in some terminals (usually over a remote connexion) the accented characters are displayed, and in others they are not. Sometimes the terminal has to be forced to display UTF-8. Maybe whatever terminal/... you are typing in needs that too?
-peter |
|
Back to top |
|
|
notHerbert Advocate
Joined: 11 Mar 2008 Posts: 2228 Location: 45N 73W
|
Posted: Wed Oct 22, 2008 10:07 pm Post subject: |
|
|
Code: | ~ mybox $ toe
ansi ansi/pc-term compatible with color
dumb 80-column dumb tty
linux linux console
rxvt rxvt terminal emulator (X Window System)
screen VT 100/ANSI X3.64 virtual terminal
sun Sun Microsystems Inc. workstation console
vt100 dec vt100 (w/advanced video)
vt102 dec vt102
vt220 dec vt220
vt52 dec vt52
xterm xterm terminal emulator (X Window System)
xterm-color generic color xterm
xterm-xfree86 xterm terminal emulator (XFree86)
|
|
|
Back to top |
|
|
LimeFrog Apprentice
Joined: 31 Mar 2003 Posts: 187 Location: Skövde, Sweden
|
Posted: Fri Oct 24, 2008 7:28 am Post subject: |
|
|
Hmm, that's identical to my output of toe.
Code: | S44 ~ # toe
ansi ansi/pc-term compatible with color
dumb 80-column dumb tty
linux linux console
rxvt rxvt terminal emulator (X Window System)
sun Sun Microsystems Inc. workstation console
screen VT 100/ANSI X3.64 virtual terminal
vt52 dec vt52
vt100 dec vt100 (w/advanced video)
vt102 dec vt102
vt220 dec vt220
xterm xterm terminal emulator (X Window System)
xterm-color generic color xterm
xterm-xfree86 xterm terminal emulator (XFree86) |
_________________ I don't believe in God, but I'm afraid of him! |
|
Back to top |
|
|
LimeFrog Apprentice
Joined: 31 Mar 2003 Posts: 187 Location: Skövde, Sweden
|
Posted: Mon Oct 27, 2008 8:19 am Post subject: |
|
|
I gave up on getting UTF-8 running on my system, so I'm now successfully running ISO-8859-1 instead.
https://forums.gentoo.org/viewtopic-t-518874.html _________________ I don't believe in God, but I'm afraid of him! |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Mon Oct 27, 2008 11:38 am Post subject: |
|
|
I'm sad to hear that. |
|
Back to top |
|
|
|