Re: Problem with console and locales [SOLVED]
Awesome!! Thank you very much Mr. Florian Kulzer! You hit the nail on the head, plus you explained the issue in a very clear and easy way. I'll convert all my files to utf8, set my editors correctly and ofcourse add that package into my tex files header. I'm happy now. :D Cheers!
Re: Problem with console and locales
[ Please put your answers/reactions in the quoted older message instead of on top of it. This makes it easier for the other people on the list (who may not remember our earlier conversation) to follow the discussion. ] On Sun, Feb 03, 2008 at 21:23:35 -0200, Andres Migliazzo wrote: > Awesome... we are on the road now, I've tried console-setup package in > combination with the > console-terminus fonts as you told me, but the issue still remains. When I > use "more" I see a "white square" instead of "á - ú or ñ" characters, and > when I check the text file with aspell it does not show these special > characters neither (shows "C rdoba" instead of "Córdoba"). Maybe the file itself is not encoded in utf-8. Try to run "file" on it: $ file test1.txt test2.txt test1.txt: UTF-8 Unicode text test2.txt: ISO-8859 text (I created two short test files for this demonstration.) $ hd test1.txt test2.txt 43 c3 b3 72 64 6f 62 61 0a 43 f3 72 64 6f 62 61 |C..rdoba.C.rdoba| 0010 0a|.| You see that the "ó" character is encoded as 0xc3 0xb3 (2 bytes) in utf-8, but as 0xf3 (1 byte) in iso8859-1. Therefore, things can go wrong: $ cat test1.txt test2.txt Córdoba C�rdoba My utf-8-based terminal does not understand the iso-8859 encoded "ó" and prints a placeholder symbol instead. The "�" shows up as a question mark sign in my X terminal and as a white square on my tty with the terminus font. You can convert the text to utf-8 with the "iconv" utility and then it should work: $ iconv -f iso8859-1 -t utf8 test2.txt > test3.txt $ cat test3.txt Córdoba The problem is that plain text files do not necessarily contain a header that specifies the encoding, therefore a program that has to process the text might not interpret the byte sequences correctly. (The "file" utility analyzes the file and determines the encoding, but many other programs just use some default setting.) The best approach is probably to convert everything to utf-8 and set the defaults of all editors and pagers accordingly. If you have filenames with non-standard characters then the "convmv" package can help to convert them so that they show up correctly on an utf-8 setting. Finally, don't forget that you have to put \usepackage[utf8]{inputenc} into the preamble of your latex documents for latex to process the special characters in a utf-8 input file correctly. > Maybe if I show you some of mine configuration files we can solve this: [...] > Euclides:/etc# egrep -v "^\#|^$" default/console-setup [...] > XKBMODEL="pc105" > XKBLAYOUT="es" > XKBVARIANT="nodeadkeys" > XKBOPTIONS="lv3:ralt_switch,compose:rwin" > BOOTTIME_KMAP_MD5="80842f76431ec5259444e6b8f4a53b62" > # > > my xorg.conf file contains: > > # > Section "InputDevice" > Identifier "Generic Keyboard" > Driver "kbd" > Option "CoreKeyboard" > Option "XkbRules" "xorg" > Option "XkbModel" "pc105" > Option "XkbLayout" "es" > Option "XkbVariant""la" > EndSection > # That looks all OK to me. If you want you can try whether console-setup supports the "la" XKBVARIANT, then the two configurations would be identical. -- Regards,| http://users.icfo.es/Florian.Kulzer Florian |
Re: Problem with console and locales
Awesome... we are on the road now, I've tried console-setup package in combination with the console-terminus fonts as you told me, but the issue still remains. When I use "more" I see a "white square" instead of "á - ú or ñ" characters, and when I check the text file with aspell it does not show these special characters neither (shows "C rdoba" instead of "Córdoba"). Maybe if I show you some of mine configuration files we can solve this: # Euclides:/etc# egrep -v "^\#|^$" locale.gen en_US.UTF-8 UTF-8 Euclides:/etc# locale LANG=en_US.UTF-8 LANGUAGE=en_US 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= Euclides:/etc# egrep -v "^\#|^$" default/console-setup VERBOSE_OUTPUT=no ACTIVE_CONSOLES="/dev/tty[1-6]" CHARMAP="UTF-8" CODESET="Lat15" FONTFACE="TerminusBold" FONTSIZE="20x10" XKBMODEL="pc105" XKBLAYOUT="es" XKBVARIANT="nodeadkeys" XKBOPTIONS="lv3:ralt_switch,compose:rwin" BOOTTIME_KMAP_MD5="80842f76431ec5259444e6b8f4a53b62" # my xorg.conf file contains: # Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "es" Option "XkbVariant""la" EndSection # Thank you in Advance On Feb 3, 2008 12:46 PM, Florian Kulzer <[EMAIL PROTECTED]> wrote: > On Wed, Jan 30, 2008 at 21:03:30 -0200, Andres Migliazzo wrote: > > [...] > > > I have a similar question... I'm wondering if is doable to set up your > > debian system in English and read special characters (like á-ú,ñ) in the > tty > > console. > > Yes, that is possible. You need an English locale that allows you to > encode these characters and a font that contains the necessary symbols. > > > I'm a TeX user and use to do a spelling check using aspell > (#aspell > > -t -c file.tex --lang=es), but when I've to do texts in Spanish I'm not > able > > to see the special characters because it's not supported by my system. > For > > instance, instead of "Córdoba" you see "C rdoba), and when you use a > file > > parser like more, you see funny characters in "ó" place. > > The missing character in "C rdoba" suggests that your tty font does not > have the "ó" symbol. If you see more than one strange character in > "more" then you might furthermore have a mix-up between iso-8859-1 and > utf-8 encoding. > > > Does anyone have a clue how to set up my system to achieve this? > > Which locale do you use at the moment? Run "locale" to find out. I use > "en_US.UTF-8" and the console-setup package in combination with the > console-terminus fonts. > > These are my settings in /etc/default/console-setup: > > CHARMAP="UTF-8" > CODESET="Lat15" > > FONTFACE="TerminusBold" > FONTSIZE="20x10" > > XKBMODEL="pc105" > XKBLAYOUT="es" > XKBVARIANT="nodeadkeys" > XKBOPTIONS="lv3:ralt_switch,compose:rwin" > > This gives me access to all the special characters used in Spanish, as > well as to other symbols (e.g. "ø") by means of the right-Windows key > which acts as a "compose" key. Of course, characters like ñ, ¿, ¡, º, > etc. can be entered directly by using their dedicated keys. > > If you prefer to have "dead" accent keys (most of my Spanish colleagues > seem to like this configuration) then you can omit the XKBVARIANT=... > line. If you also use X on that machine then it is probably the best to > use the same keyboard configuration as under X. (The console-setup > configuration accepts the same definitions as the keyboard section of > xorg.conf.) > > -- > Regards,| http://users.icfo.es/Florian.Kulzer > Florian | > >
Re: Problem with console and locales
On Wed, Jan 30, 2008 at 21:03:30 -0200, Andres Migliazzo wrote: [...] > I have a similar question... I'm wondering if is doable to set up your > debian system in English and read special characters (like á-ú,ñ) in the tty > console. Yes, that is possible. You need an English locale that allows you to encode these characters and a font that contains the necessary symbols. > I'm a TeX user and use to do a spelling check using aspell (#aspell > -t -c file.tex --lang=es), but when I've to do texts in Spanish I'm not able > to see the special characters because it's not supported by my system. For > instance, instead of "Córdoba" you see "C rdoba), and when you use a file > parser like more, you see funny characters in "ó" place. The missing character in "C rdoba" suggests that your tty font does not have the "ó" symbol. If you see more than one strange character in "more" then you might furthermore have a mix-up between iso-8859-1 and utf-8 encoding. > Does anyone have a clue how to set up my system to achieve this? Which locale do you use at the moment? Run "locale" to find out. I use "en_US.UTF-8" and the console-setup package in combination with the console-terminus fonts. These are my settings in /etc/default/console-setup: CHARMAP="UTF-8" CODESET="Lat15" FONTFACE="TerminusBold" FONTSIZE="20x10" XKBMODEL="pc105" XKBLAYOUT="es" XKBVARIANT="nodeadkeys" XKBOPTIONS="lv3:ralt_switch,compose:rwin" This gives me access to all the special characters used in Spanish, as well as to other symbols (e.g. "ø") by means of the right-Windows key which acts as a "compose" key. Of course, characters like ñ, ¿, ¡, º, etc. can be entered directly by using their dedicated keys. If you prefer to have "dead" accent keys (most of my Spanish colleagues seem to like this configuration) then you can omit the XKBVARIANT=... line. If you also use X on that machine then it is probably the best to use the same keyboard configuration as under X. (The console-setup configuration accepts the same definitions as the keyboard section of xorg.conf.) -- Regards,| http://users.icfo.es/Florian.Kulzer Florian |
Re: Problem with console and locales
Alejandro, how was that? were you able to set up in the way you want? I have a similar question... I'm wondering if is doable to set up your debian system in English and read special characters (like á-ú,ñ) in the tty console. I'm a TeX user and use to do a spelling check using aspell (#aspell -t -c file.tex --lang=es), but when I've to do texts in Spanish I'm not able to see the special characters because it's not supported by my system. For instance, instead of "Córdoba" you see "C rdoba), and when you use a file parser like more, you see funny characters in "ó" place. Does anyone have a clue how to set up my system to achieve this? Best Regards. Andrew On Jan 22, 2008 5:59 PM, Paul Csanyi <[EMAIL PROTECTED]> wrote: > 2008/1/22, Florian Kulzer <[EMAIL PROTECTED]>: > > [ Please stop top-posting. ] > > > > On Mon, Jan 21, 2008 at 21:59:13 -0600, Alejandro Aguila Sáinz wrote: > > > Hi, now I sent dpkg-reconfigure again and I get this: > > > > > > debian:/home/alekz# dpkg-reconfigure locales > > > perl: warning: Setting locale failed. > > > perl: warning: Please check that your locale settings: > > > LANGUAGE = "Es_es", > > > LC_ALL = "Es_es", > > > LANG = "es_MX" > > > are supported and installed on your system. > > > perl: warning: Falling back to the standard locale ("C"). > > > > [...] > > > > > Generating locales (this might take a while)... > > > es_MX.UTF-8... done > > > es_MX.ISO-8859-1... done > > > Generation complete. > > > > [...] > > > > > Any idea? Thanks > > > > Run > > > > export LC_ALL="es_MX.UTF-8" LANG="es_MX.UTF-8" LANGUAGE="es_MX.UTF-8" > > > > right before you try "dpkg-reconfigure locales" again. Then make > > es_MX.UTF-8 the system-wide default. Afterwards log out, log in again > > and verify the settings by running "locale". > > > > Then execute > > > > echo -e "S\0303\0241inz" > > > > and check if this prints your last name correctly. If you get two > > "weird" characters instead of the accented a, then your terminal does > > not understand UTF-8. If you get one placeholder character (a box or a > > question mark), then your font is missing the "á" symbol. > > Try console-setup tool too! > > -- > Regards, Paul Csanyi > http://www.freewebs.com/csanyi-pal/index.htm > >
Re: Problem with console and locales
2008/1/22, Florian Kulzer <[EMAIL PROTECTED]>: > [ Please stop top-posting. ] > > On Mon, Jan 21, 2008 at 21:59:13 -0600, Alejandro Aguila Sáinz wrote: > > Hi, now I sent dpkg-reconfigure again and I get this: > > > > debian:/home/alekz# dpkg-reconfigure locales > > perl: warning: Setting locale failed. > > perl: warning: Please check that your locale settings: > > LANGUAGE = "Es_es", > > LC_ALL = "Es_es", > > LANG = "es_MX" > > are supported and installed on your system. > > perl: warning: Falling back to the standard locale ("C"). > > [...] > > > Generating locales (this might take a while)... > > es_MX.UTF-8... done > > es_MX.ISO-8859-1... done > > Generation complete. > > [...] > > > Any idea? Thanks > > Run > > export LC_ALL="es_MX.UTF-8" LANG="es_MX.UTF-8" LANGUAGE="es_MX.UTF-8" > > right before you try "dpkg-reconfigure locales" again. Then make > es_MX.UTF-8 the system-wide default. Afterwards log out, log in again > and verify the settings by running "locale". > > Then execute > > echo -e "S\0303\0241inz" > > and check if this prints your last name correctly. If you get two > "weird" characters instead of the accented a, then your terminal does > not understand UTF-8. If you get one placeholder character (a box or a > question mark), then your font is missing the "á" symbol. Try console-setup tool too! -- Regards, Paul Csanyi http://www.freewebs.com/csanyi-pal/index.htm
Re: Problem with console and locales
[ Please stop top-posting. ] On Mon, Jan 21, 2008 at 21:59:13 -0600, Alejandro Aguila Sáinz wrote: > Hi, now I sent dpkg-reconfigure again and I get this: > > debian:/home/alekz# dpkg-reconfigure locales > perl: warning: Setting locale failed. > perl: warning: Please check that your locale settings: > LANGUAGE = "Es_es", > LC_ALL = "Es_es", > LANG = "es_MX" > are supported and installed on your system. > perl: warning: Falling back to the standard locale ("C"). [...] > Generating locales (this might take a while)... > es_MX.UTF-8... done > es_MX.ISO-8859-1... done > Generation complete. [...] > Any idea? Thanks Run export LC_ALL="es_MX.UTF-8" LANG="es_MX.UTF-8" LANGUAGE="es_MX.UTF-8" right before you try "dpkg-reconfigure locales" again. Then make es_MX.UTF-8 the system-wide default. Afterwards log out, log in again and verify the settings by running "locale". Then execute echo -e "S\0303\0241inz" and check if this prints your last name correctly. If you get two "weird" characters instead of the accented a, then your terminal does not understand UTF-8. If you get one placeholder character (a box or a question mark), then your font is missing the "á" symbol. -- Regards,| http://users.icfo.es/Florian.Kulzer Florian |
Re: Problem with console and locales
On 1/21/08, Lennart Andersen <[EMAIL PROTECTED]> wrote: > > * Alejandro Aguila Sáinz <[EMAIL PROTECTED]> [2008-01-21 21:59-0600] > >Hi, now I sent dpkg-reconfigure again and I get this: > >debian:/home/alekz# dpkg-reconfigure locales > >perl: warning: Setting locale failed. > >perl: warning: Please check that your locale settings: > >LANGUAGE = "Es_es", > >LC_ALL = "Es_es", > >LANG = "es_MX" > >are supported and installed on your system. > >perl: warning: Falling back to the standard locale ("C"). > >locale: Cannot set LC_CTYPE to default locale: No such file or > directory > >locale: Cannot set LC_MESSAGES to default locale: No such file or > >directory > >locale: Cannot set LC_ALL to default locale: No such file or > directory > >/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file > or > >directory > >/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such > file or > >directory > >/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or > >directory > >Generating locales (this might take a while)... > > es_MX.UTF-8... done > > es_MX.ISO-8859-1... done > >Generation complete. > >perl: warning: Setting locale failed. > >perl: warning: Please check that your locale settings: > >LANGUAGE = "Es_es", > >LC_ALL = "Es_es", > >LANG = "es_MX" > >are supported and installed on your system. > >perl: warning: Falling back to the standard locale ("C"). > >perl: warning: Setting locale failed. > >perl: warning: Please check that your locale settings: > >LANGUAGE = "Es_es", > >LC_ALL = "Es_es", > >LANG = "es_MX" > >are supported and installed on your system. > >perl: warning: Falling back to the standard locale ("C"). > >debian:/home/alekz# > > > >Any idea? Thanks > > > >On 1/21/08, Alejandro Aguila Sáinz <[EMAIL PROTECTED]> wrote: > > > > Hey there! Thanks for your interest, and yes the font I have > supports my > > special characters, and everything was ok untill I reconfigured > locales. > > > > Thanks > > > > On 1/21/08, [EMAIL PROTECTED] < [EMAIL PROTECTED] > > > > wrote: > > > >On 22/01/2008, Alejandro Aguila Sainz wrote: > >> Hi, I have a problem with my console, I changed my locales by > using > >> dpkg-reconfigure locales but now the console is not taking all > the > >> characters, I'm from Mexico so I use locales es_MX UTF-8, and > >console can't > >> see or type acents, if someone can help me would be great! > Thanks. > > > >Dear Alejandro, > > > >While this may not be helpful, I would just want you to check if > the > >font you are using for your console supports the characters you > want. > >Earlier, I faced similar problems which vanished when I chose the > >right font. Try DejaVu Sans Mono, for instance. > > > >HTH. > > > >Kumar > > > >-- > >Kumar Appaiah, > >458, Jamuna Hostel, > >Indian Institute of Technology Madras, > >Chennai - 600036 > > > >-- > >To UNSUBSCRIBE, email to [EMAIL PROTECTED] > >with a subject of "unsubscribe". Trouble? Contact > >[EMAIL PROTECTED] > > > > -- > > Alejandro Aguila Sáinz <[EMAIL PROTECTED]> > > PGP KEY: 14D45A26 > > Fingerprint: 9670 F4A3 0568 42AF DF1A 2429 C1D3 D6A6 14D4 5A26 > > > >-- > >Alejandro Aguila Sáinz <[EMAIL PROTECTED]> > >PGP KEY: 14D45A26 > >Fingerprint: 9670 F4A3 0568 42AF DF1A 2429 C1D3 D6A6 14D4 5A26 > > > > References > > > >Visible links > >1. mailto:[EMAIL PROTECTED] > >2. mailto:[EMAIL PROTECTED] > >3. mailto:[EMAIL PROTECTED] > >4. mailto:[EMAIL PROTECTED] > >5. mailto:[EMAIL PROTECTED] > >6. mailto:[EMAIL PROTECTED] > >7. mailto:[EMAIL PROTECTED] > > Try to put this in your .bashrc file > > export LC_CTYPE=Es_es > > > -- Lennart Andersen > St Thomas, Ontario > http://gdane.dlinkddns.com > lka0871 at rogers dot com > > - Debian - apt-get into it > > Same thing Lennart :( is not fixed -- Alejandro Aguila Sáinz <[EMAIL PROTECTED]> PGP KEY: 14D45A26 Fingerprint: 9670 F4A3 0568 42AF DF1A 2429 C1D3 D6A6 14D4 5A26
Re: Problem with console and locales
Hi, now I sent dpkg-reconfigure again and I get this: debian:/home/alekz# dpkg-reconfigure locales perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "Es_es", LC_ALL = "Es_es", LANG = "es_MX" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory /usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory /usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory /usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory Generating locales (this might take a while)... es_MX.UTF-8... done es_MX.ISO-8859-1... done Generation complete. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "Es_es", LC_ALL = "Es_es", LANG = "es_MX" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "Es_es", LC_ALL = "Es_es", LANG = "es_MX" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). debian:/home/alekz# Any idea? Thanks On 1/21/08, Alejandro Aguila Sáinz <[EMAIL PROTECTED]> wrote: > > Hey there! Thanks for your interest, and yes the font I have supports my > special characters, and everything was ok untill I reconfigured locales. > > Thanks > > On 1/21/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > On 22/01/2008, Alejandro Aguila Sainz wrote: > > > Hi, I have a problem with my console, I changed my locales by using > > > dpkg-reconfigure locales but now the console is not taking all the > > > characters, I'm from Mexico so I use locales es_MX UTF-8, and console > > can't > > > see or type acents, if someone can help me would be great! Thanks. > > > > Dear Alejandro, > > > > While this may not be helpful, I would just want you to check if the > > font you are using for your console supports the characters you want. > > Earlier, I faced similar problems which vanished when I chose the > > right font. Try DejaVu Sans Mono, for instance. > > > > HTH. > > > > Kumar > > > > -- > > Kumar Appaiah, > > 458, Jamuna Hostel, > > Indian Institute of Technology Madras, > > Chennai - 600036 > > > > > > -- > > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > > with a subject of "unsubscribe". Trouble? Contact > > [EMAIL PROTECTED] > > > > > > > -- > Alejandro Aguila Sáinz <[EMAIL PROTECTED]> > PGP KEY: 14D45A26 > Fingerprint: 9670 F4A3 0568 42AF DF1A 2429 C1D3 D6A6 14D4 5A26 > -- Alejandro Aguila Sáinz <[EMAIL PROTECTED]> PGP KEY: 14D45A26 Fingerprint: 9670 F4A3 0568 42AF DF1A 2429 C1D3 D6A6 14D4 5A26
Re: Problem with console and locales
Hey there! Thanks for your interest, and yes the font I have supports my special characters, and everything was ok untill I reconfigured locales. Thanks On 1/21/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On 22/01/2008, Alejandro Aguila Sainz wrote: > > Hi, I have a problem with my console, I changed my locales by using > > dpkg-reconfigure locales but now the console is not taking all the > > characters, I'm from Mexico so I use locales es_MX UTF-8, and console > can't > > see or type acents, if someone can help me would be great! Thanks. > > Dear Alejandro, > > While this may not be helpful, I would just want you to check if the > font you are using for your console supports the characters you want. > Earlier, I faced similar problems which vanished when I chose the > right font. Try DejaVu Sans Mono, for instance. > > HTH. > > Kumar > > -- > Kumar Appaiah, > 458, Jamuna Hostel, > Indian Institute of Technology Madras, > Chennai - 600036 > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact > [EMAIL PROTECTED] > > -- Alejandro Aguila Sáinz <[EMAIL PROTECTED]> PGP KEY: 14D45A26 Fingerprint: 9670 F4A3 0568 42AF DF1A 2429 C1D3 D6A6 14D4 5A26
Re: Problem with console and locales
On 22/01/2008, Alejandro Aguila Sainz wrote: > Hi, I have a problem with my console, I changed my locales by using > dpkg-reconfigure locales but now the console is not taking all the > characters, I'm from Mexico so I use locales es_MX UTF-8, and console can't > see or type acents, if someone can help me would be great! Thanks. Dear Alejandro, While this may not be helpful, I would just want you to check if the font you are using for your console supports the characters you want. Earlier, I faced similar problems which vanished when I chose the right font. Try DejaVu Sans Mono, for instance. HTH. Kumar -- Kumar Appaiah, 458, Jamuna Hostel, Indian Institute of Technology Madras, Chennai - 600036 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]