LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-28-2007, 05:11 AM   #1
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Rep: Reputation: 30
X doesn't seem to use UTF-8


Hello!
My problem is that some X applications (like Firefox and XCHM) don't show non-ascii characters, but print a rectangulare with 4 hexadecimal values instead.
Here's my 'locale' output:
Code:
LANG=it_IT.utf8
LC_CTYPE="it_IT.utf8"
LC_NUMERIC="it_IT.utf8"
LC_TIME="it_IT.utf8"
LC_COLLATE="it_IT.utf8"
LC_MONETARY="it_IT.utf8"
LC_MESSAGES="it_IT.utf8"
LC_PAPER="it_IT.utf8"
LC_NAME="it_IT.utf8"
LC_ADDRESS="it_IT.utf8"
LC_TELEPHONE="it_IT.utf8"
LC_MEASUREMENT="it_IT.utf8"
LC_IDENTIFICATION="it_IT.utf8"
LC_ALL=it_IT.utf8
Until this morning, it was en_US for every value, I tried changing it to it_IT.utf8 (i'm from Italy) but nothing changed.

I check http://www.columbia.edu/kermit/utf8.html to see if it works. On the top of the page, I can see correctly only the first 5 symbols.

Thanks for you help!
 
Old 02-28-2007, 06:48 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949
Make sure you're using a font that can handle the language you want to view. Many older and simpler fonts only cover the basic western scripts. There are some good unicode fonts out there, for example, that support most major languages. You may need to hunt down special fonts for the rarer languages.

Also, Firefox or other web browsers have the option to switch locale settings for the pages they display, since websites can be written in many different encodings.
 
Old 02-28-2007, 09:14 AM   #3
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Original Poster
Rep: Reputation: 30
How can i see which font X is using?

Thanks!

p.s. i'll go and get a look at xorg.conf meanwhile...
 
Old 02-28-2007, 09:47 AM   #4
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Original Poster
Rep: Reputation: 30
I took a look at /usr/lib/X11/fonts, where there are directories like 100dpi, 75dpi, etc. In there, there are no files which have UTF in their name, while there are many which have ISO-8859-1, for example, and so on.
Does this mean that i don't have UTF-supporting fonts?

Moreover, in the encodings directory, there's no utf or unicode.

Thanks to everyone.
 
Old 05-08-2007, 05:10 AM   #5
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Original Poster
Rep: Reputation: 30
I've still got this problem... :-)
I'm sure there are no unicode fonts installed, but only iso 8859-x ones.
Where can i find and install unicode fonts for x?
Thanks to everyone
 
Old 05-08-2007, 08:14 AM   #6
dhubsith
Member
 
Registered: Dec 2006
Location: New Mexico, USA
Distribution: Slackware
Posts: 62

Rep: Reputation: 15
Have you tried the DejaVu font? It is a TrueType font with a lot of language support.

If you go to news.google.com, and go to the bottom of the page, you will see a list of the International Versions, which show the country name in the native language, a good test page to see if your fonts are right.

Hope this helps.
 
Old 05-09-2007, 08:43 AM   #7
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Original Poster
Rep: Reputation: 30
This is what i've done:
- downloaded dejavu fonts
- untar'ed and moved directory to $PREFIX/lib/fonts/dejavu
- cd into that directory
- mkfontdir .
- mkfontscale .
- checked fonts.dir and fonts.scale - they look fine, first line is 298, i suppose it's the number of fonts.
- added:
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
to xorg.conf
- restarted X

Result: still can't view unicode fonts correctly (i've checked news.google.com and another website with unicode samples)

EDIT: Moreover, if i comment the other "FontPath" lines, and leave only the dejavu one, X doesn't start and complains that it cannot find the defaull font 'fixed'.

Last edited by simopal6; 05-09-2007 at 08:51 AM.
 
Old 05-09-2007, 11:30 AM   #8
dhubsith
Member
 
Registered: Dec 2006
Location: New Mexico, USA
Distribution: Slackware
Posts: 62

Rep: Reputation: 15
That all looks correct. I do a couple of other things (this from my notes):

In Control Center/Appearance and Themes/Fonts: Change fonts to Deja Vu Sans 12 (except Fixed Width to Deja Vu Sans Mono 12, Window Title to Deja Vu Sans 14, and Desktop to Deja Vu Sans 11 Bold)

In my Firefox profile, I add these to user.js:

user_pref("font.default.x-central-euro", "sans-serif");
user_pref("font.default.x-cyrillic", "sans-serif");
user_pref("font.default.x-unicode", "sans-serif");
user_pref("font.default.x-western", "sans-serif");
user_pref("font.name.sans-serif.x-central-euro", "DejaVu Sans");
user_pref("font.name.sans-serif.x-cyrillic", "DejaVu Sans");
user_pref("font.name.sans-serif.x-unicode", "DejaVu Sans");
user_pref("font.name.sans-serif.x-western", "DejaVu Sans");
user_pref("intl.charsetmenu.browser.cache", "windows-1250, UTF-8, ISO-8859-1");

As you see, I use DejaVu for pretty much everything.

EDIT: in xorg.conf you need:

FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"

Last edited by dhubsith; 05-09-2007 at 11:32 AM.
 
Old 05-10-2007, 09:29 AM   #9
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Original Poster
Rep: Reputation: 30
My mistake, i had to copy the fonts to TTF and not to another directory. Now they work. But i've found out that windows ttf fonts cover more part of the unicode the the dejavu ones.
The website i use to test my fonts is http://www.columbia.edu/kermit/utf8.html.

Thanks for your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
im getting UTF-8 to STRING: Could not open converter from 'UTF-8' to 'ISO-8859-1' jabka Linux - Newbie 2 11-24-2006 05:44 AM
why mozilla don't use utf-8 ewt3y Mandriva 8 06-26-2005 02:40 AM
How do I know how a file is encoded? UTF-8, UTF-16, etc.. ?? brynjarh Linux - General 1 12-03-2004 11:11 AM
[Enter] in text documents diffrent on Windows and Linux? UTF-8/UTF-16 problem or? brynjarh Linux - General 1 11-24-2004 05:20 AM
X11 / UTF-8 locale seems missing 'fr_FR.UTF-8' chrsitophermann Debian 11 07-17-2004 02:04 PM


All times are GMT -5. The time now is 02:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration