Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Unicode]utf8 ou UTF8 ? ( résolu )
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
nemo13
Veteran
Veteran


Joined: 08 Oct 2004
Posts: 1016
Location: France/Istres

PostPosted: Mon Nov 07, 2005 11:12 pm    Post subject: [Unicode]utf8 ou UTF8 ? ( résolu ) Reply with quote

Bonsoir ,

Préalable :
ok c'est un topic de plus sur UTF8 / unicode/ ces put.. d'accent francais.
ok le dernier en date est celui de Ophilim.

donc pourquoi celui-ci ?

parce que j'aimes pas squatter les posts ; mais si les modos l'estime utile, je déménagerai sur le post qu'ils m'indiqueront.

Intro :
mon passage utf8 n'est pas satisfaisant et je recherche à quel moment j'ai dérappé.

premier point :

doit-on mettre utf en minuscule ?
UTF en majuscule ?

En effet dans le tuto : http://www.gentoo.org/doc/fr/utf-8.xml

l'exemple 2.1 montre :
Code:
# locale -a | grep 'fr_FR'
fr_FR
fr_FR.UTF-8


UTF est en majuscule

or quand je le fais sur ma machine j'obtiens :

Code:
nemo13@gentoo ~ $ locale -a |grep 'fr_FR'
fr_FR
fr_FR@euro
fr_FR.utf8
nemo13@gentoo ~ $


utf est en minuscule

et évidement dans mon /etc/locales.build j'ai mis :
UTF en majuscule :oops:

Sui-je bon pour tout recommencer ?[/code]

edit : en plus en lisant ce post je vois qu'il y a un "-" entre UTF et 8
donc je dois avoir tout faux dans mon build ?


Last edited by nemo13 on Sun Jan 22, 2006 10:44 pm; edited 2 times in total
Back to top
View user's profile Send private message
kernelsensei
Bodhisattva
Bodhisattva


Joined: 22 Feb 2004
Posts: 5619
Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)

PostPosted: Mon Nov 07, 2005 11:20 pm    Post subject: Reply with quote

il faut l'écrire comme listé dans locale -a (mais il me semble que c'est pas sensible a la casse)

EDIT: en fait non, moi j'ai tout en majuscules dans les locales.build et en minuscules dans locale -a et ça marche !

dans locales.build
Code:
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
ja_JP.EUC-JP/EUC-JP
ja_JP.UTF-8/UTF-8
ja_JP/EUC-JP
fr_FR/ISO-8859-1
fr_FR@euro/ISO-8859-15
fr_FR.UTF-8/UTF-8


Code:
$ locale -a
C
en_US
en_US.utf8
fr_FR
fr_FR@euro
fr_FR.utf8
ja_JP
ja_JP.eucjp
ja_JP.utf8
POSIX

_________________
$ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join'
Back to top
View user's profile Send private message
Antares
Apprentice
Apprentice


Joined: 04 Apr 2005
Posts: 184
Location: France

PostPosted: Mon Nov 07, 2005 11:38 pm    Post subject: Reply with quote

me suis posé la meme question que toi en passant en utf8. J'ai tout mis en minuscule et ca fonctionne impeccable.... :d
Back to top
View user's profile Send private message
nemo13
Veteran
Veteran


Joined: 08 Oct 2004
Posts: 1016
Location: France/Istres

PostPosted: Mon Nov 07, 2005 11:39 pm    Post subject: Reply with quote

bonsoir K_S ,

Flute, je croyais tenir une piste puis celà s'effondre puisque j'ai aussi :

Code:
nemo13@gentoo ~ $ locale
LANG=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8
nemo13@gentoo ~ $


Code:
nemo13@gentoo ~ $ cat /etc/locales.build
# modifie par jlp le 2005-10-26 d'apres la doc gentoo
# http://www.gentoo.org/doc/fr/utf-8.xml
#
# This file names the list of locales to be built when glibc is installed.
# The format is <locale>/<charmap>, where <locale> is a locale from the
# /usr/share/i18n/locales directory, and <charmap> is name of one of the files
# in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are
# ignored. Here is an example:
# en_US/ISO-8859-1

en_US/ISO-8859-1
en_US.UTF-8/UTF-8
fr_FR/ISO-8859-1
fr_FR@euro/ISO-8859-15
fr_FR.UTF-8/UTF-8


Code:
nemo13@gentoo ~ $ locale -a |grep 'fr_FR'
fr_FR
fr_FR@euro
fr_FR.utf8
nemo13@gentoo ~ $


donc à priori, c'est pas la bonne piste

Peut-être dans consolefonte et translation ?

Code:

CONSOLEFONT="lat9w-16"
# la ligne suivante doit me donner la langue francaise et les accents
CONSOLETRANSLATION="8859-15_to_uni"


pour le moment je vais faire dormir les yeux :(
A+:jlp
Back to top
View user's profile Send private message
ultrabug
Developer
Developer


Joined: 24 Jan 2005
Posts: 698
Location: Paris

PostPosted: Tue Nov 08, 2005 8:26 am    Post subject: Reply with quote

Salut !

Alors c'est pas tant hors sujet mais c'est un TIP !

Si vous voulez les accents pris en compte MAIS que le système reste en anglais (man, wm etc...) vous devrez avoir cela :
Code:

$ locale
LANG=fr_FR.UTF-8
LC_CTYPE=fr_FR.UTF-8
LC_NUMERIC=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LC_COLLATE=fr_FR.UTF-8
LC_MONETARY=fr_FR.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=fr_FR.UTF-8
LC_NAME=fr_FR.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_ALL=


Ca marche, c'est bien plus propre (à mon gout) et pas d'écart de traduction comme ca

Sinon j'ai les memes locales.build que les autres amis, et j'ai ceci en /etc/env.d/02locale
Code:

$ more /etc/env.d/02locale
LANG="fr_FR.UTF-8"
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=""


Bonne continuation :)
Back to top
View user's profile Send private message
marvin rouge
Veteran
Veteran


Joined: 01 Aug 2004
Posts: 1422
Location: Villa Lumierrante, Zonelibre

PostPosted: Tue Nov 08, 2005 8:32 am    Post subject: Reply with quote

Et pour avoir tout le système en francais, sauf les man-pages, il faut mettre sys-apps/man-pages -nls dans /etc/portage/package.use

:wink:
Back to top
View user's profile Send private message
nemo13
Veteran
Veteran


Joined: 08 Oct 2004
Posts: 1016
Location: France/Istres

PostPosted: Thu Nov 10, 2005 10:27 pm    Post subject: Reply with quote

bonsoir,

Merci à tous ceux qui se sont penchés sur ce post :D

donc après deux soirs de lecture sur le web des réussites ou des déboires de ceux
qui ont taté de l'utf8 j'en suis resté , pour le moment , à l'étape suivante:

dans /etc/man.conf
Code:
NROFF          iconv -f utf8 -t iso8859-1 | /usr/bin/nroff -mandoc -c -mandoc -Tutf8


A priori, pour tous les man-fr que j'ai lu, il n'y aurait celui de mplayer
qui présenterait des artéfacts d'affichage.

j'essaye maintenat de voir les pistes suivantes :

1) serait-ce ma fonte qui n'est adaptée à l'utf8 ?
(mais pourquoi que pour mplayer ?)

2) mon noyau qui est mal configuré ?

Code:
nemo13@gentoo ~ $ grep -i nls /usr/src/linux/.config
CONFIG_UDF_NLS=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_15=y
CONFIG_NLS_UTF8=y


( A propos pourquoi n'y aurait-il pas dans le noyau un

Code:
CONFIG_NLS_ISO10646=


puisque la normalisation ISO de l'unicode est 10646 ?

A+:jlp
Back to top
View user's profile Send private message
nemo13
Veteran
Veteran


Joined: 08 Oct 2004
Posts: 1016
Location: France/Istres

PostPosted: Tue Jan 17, 2006 11:24 pm    Post subject: Reply with quote

Bonsoir,

ok c'est une "ressucitation" de topic mais j'ai avancé sur les point suivants :

1) mon titre n'est plus bon car après analyse 8)
ce n'est pas une histoire utf8 majuscule ou minuscule
c'est :flute je suis en UTF8 et à l'écran je perd mes caractères accentués
mais pas dans toutes les applis !
( je pense pas que ce titre passe )

c'est une somme de différents problèmes :

Pour les pages man_fr :
bien qu'en modifiant NROFF dans /etc/man.conf
( au choix de l'experimentateur :? )
Code:

#NROFF          /usr/bin/nroff -Tascii -c -mandoc       
#result mplayer francais sans accent c bidon man 7 utf-8 bidon
#NROFF          /usr/bin/nroff  -mandoc -c             
#result mplayer ok c bidon man 7 utf-8 bidon
#NROFF          /usr/bin/nroff -Tlatin1 -c -mandoc               
# perte des "à" et apparition codes
#NROFF          iconv -f utf8 -t iso8859-1 | /usr/bin/nroff -mandoc -c -mandoc -Tutf8
# mplayer plante c ok man 7 utf-8 ok
#NROFF          iconv -f utf8 -t iso8859-15 | /usr/bin/nroff -mandoc -c -mandoc -Tutf8
# a priori rien de plus que ligne precedente
#NROFF          recode utf8 iso8859-15 | /usr/bin/nroff -mandoc -Tlatin1        #marche pas syntaxe ?
#NROFF          /usr/bin/nroff -utf8 -c -mandoc
#mplayer ok c bidon man 7 utf-8 bidon

donc pour le moment faut choisir :

ou man mplayer , ou man C et man 7 utf-8

Pourquoi cette différence ?

d' après moi elle vient de là :
(j'ai décompressé les fichiers
/usr/share/man/fr/man1/mplayer.1.gz
/usr/share/man/fr/man1/c.1.gz
dans mon home )
Code:
nemo13@gentoo ~ $ file -i mplayer.1
mplayer.1: text/troff; charset=iso-8859-1
nemo13@gentoo ~ $ file -i c.1
c.1: text/troff; charset=utf-8


donc encodage texte man de mplayer :iso-8859-1
encodage texte man de c :utf-8

Conclusion pour les man_fr : la solution n'est pas en modifiant /etc/man.conf


Pour les autres problèmes d'accents

il s'agissait d'applis en gtk ( Xmms pour pas le nommer ) qui ne supportent
pas nativement l'utf8

plus de problème puisque maintenant la doc gentoo utf8 donne la solution.
( il y a aussi des topics récents sur notre forum )

voili voila pour le moment :

pour avancer plus sur les man_fr j'aurais voulu explorer les autres fichiers

mais
Code:
file -i /usr/share/man/fr/man1/mplayer.1.gz
/usr/share/man/fr/man1/mplayer.1.gz: application/x-gzip

et
Code:
file -i `/bin/gunzip -c /usr/share/man/fr/man1/mplayer.1.gz`
bash: /usr/bin/file: Liste d'arguments trop longue


bref sur ce truc de "programmation" chui une bille :oops:

Quelle syntaxe dois-je utiliser pour extraire que l'info de charset sans devoir me frapper la décompression des fichiers ?

edit pour ma bête question

faut lire le man de file jusqu'au bout :
Code:
  -z, --uncompress
               Try to look inside compressed files.


d'où par exemple :
nemo13@gentoo ~ $ file -iz /usr/share/man/fr/man1/mplayer.1.gz
/usr/share/man/fr/man1/mplayer.1.gz: text/troff; charset=iso-8859-1 (application/x-gzip)
nemo13@gentoo ~ $ file -iz /usr/share/man/fr/man1/c.1.gz
/usr/share/man/fr/man1/c.1.gz: text/troff; charset=utf-8 (application/x-gzip)
nemo13@gentoo ~ $ file -iz /usr/share/man/fr/man1/passwd.1.gz
/usr/share/man/fr/man1/passwd.1.gz: text/troff; charset=iso-8859-1 (application/x-gzip)
nemo13@gentoo ~ $ file -iz /usr/share/man/fr/man1/write.1.gz
/usr/share/man/fr/man1/write.1.gz: text/troff; charset=utf-8 (application/x-gzip)
nemo13@gentoo ~ $
Code:


et comme par hazard, en ayant dans /etc/man.conf
NROFF iconv -f utf8 -t iso8859-1 | /usr/bin/nroff -mandoc -c -mandoc -Tutf8
Code:


les man de mplayer et password plantent
les man de c et write passent pile poil.
Back to top
View user's profile Send private message
ryo-san
l33t
l33t


Joined: 17 Feb 2005
Posts: 729

PostPosted: Wed Jan 18, 2006 6:17 am    Post subject: Reply with quote

ok pas vu que tu avais trouvé la soluce.
Back to top
View user's profile Send private message
_kal_
l33t
l33t


Joined: 04 Mar 2005
Posts: 602
Location: Paris

PostPosted: Wed Jan 18, 2006 9:15 am    Post subject: Reply with quote

Code:
vaio ~ # cat /etc/env.d/02locale
LC_ALL="fr_FR.UTF-8"


Perso, si je met en minuscule, les applis ncurses sont buggué a mort chez moi.
En revanche, en majuscule c'est parfait :P
Back to top
View user's profile Send private message
Adrien
Advocate
Advocate


Joined: 13 Jul 2004
Posts: 2308
Location: Bretagne

PostPosted: Wed Jan 18, 2006 9:30 am    Post subject: Reply with quote

nemo13 wrote:
Bonsoir,

ok c'est une "ressucitation"

..... "résurrection" :lol:
Merci à tous pour ces tips fort utiles! :)
Back to top
View user's profile Send private message
nemo13
Veteran
Veteran


Joined: 08 Oct 2004
Posts: 1016
Location: France/Istres

PostPosted: Wed Jan 18, 2006 4:43 pm    Post subject: Reply with quote

bonsoir à tous ,

_KAL_ > je suis aussi en Maj dans /etc/env.d/02locale
je n'ai pas testé en minuscule.

Adrien > à l'origine ce n'était un tip mais un appel au secours :oops:
mon pb des man_fr n'est pas résolu mais +- contourné

ce que je n'arrive pas à comprendre c'est pourquoi il y a des man_fr
encodé utf8 et d'autres en 8859

il aurait bien la solution de passer tous ces man par iconv
mais je crains qu'au prochain emerge je perde toutes les modif !

8) "ressucitation" était entre double crochets :twisted:
Back to top
View user's profile Send private message
nemo13
Veteran
Veteran


Joined: 08 Oct 2004
Posts: 1016
Location: France/Istres

PostPosted: Fri Jan 20, 2006 9:03 pm    Post subject: Reply with quote

bonsoir,
Je viens de faire un tour sur https://bugs.gentoo.org/

Pour mplayer
https://bugs.gentoo.org/show_bug.cgi?id=92017

pour le peu que je comprenne l'anglais , il y aurait une modif de l'Ebuild car mplayer filtrait le charset dommage que la modif ne serait appliqué que pour les localisations :
Code:
Here latest ebuild (mplayer-1.0pre7-r1 from rsync) with unicode support.
Now configure script support option "--charset".
Added keyword - unicode.
Supported language: bg cs de en hu pl ru uk.

(enfin si j'ai bien décodé )

sinon man aurait aussi des pbs mais là j'ai pas capté grand chose
( rechercher avec "manpage")

A+:jlp
Back to top
View user's profile Send private message
nemo13
Veteran
Veteran


Joined: 08 Oct 2004
Posts: 1016
Location: France/Istres

PostPosted: Sun Jan 22, 2006 10:33 pm    Post subject: Reply with quote

bonsoir,

\o/ le script qui va bien :wink:

quel courageux osera essayer ce kindy-script de la mort ..qui tue :twisted:

https://forums.gentoo.org/viewtopic-t-425826.html

euh pas la tête c'est mon premier!

édit ben cà alors et mon e accent circonflex ? ê à é ù è
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French 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