LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-24-2014, 02:19 PM   #16
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,048

Rep: Reputation: Disabled

Tip: if you're not sure of the <encoding> of a file, type:
Code:
iconv -f <encoding> -t <encoding> -o /dev/null <file>
If you get an error message, the encoding is probably wrong. Else, it's probably right.

EDIT. I was wrong, sorry. Discard this tip.

PS There's more than one way to skin a cat, and to produce man pages as well. If there is a formatting error in the result: as many steps in the pipe, as many culprits.

Last edited by Didier Spaier; 11-25-2014 at 05:34 AM. Reason: PS added.
 
Old 11-25-2014, 01:09 PM   #17
PreguntoYo
Member
 
Registered: Jan 2012
Distribution: openSUSE, Gentoo, Slackware
Posts: 71

Original Poster
Rep: Reputation: 14
Oh!. Was it so easy?.

Quote:
Originally Posted by ml4711 View Post
uxterm displays utf-8 characters, and so does MC used in uxterm!

Enjoy
Oh, that was Slack. So simple and effective. I hadn't realized it was in front of my nose

Now, if anyone knows why xmessage still displays these strange characters... I haven't found anything in the man pages, only after a search in ddg.gg (xmessage utf-8), some german guy who boasts that setting:
Code:
*international: true
in ~/.Xresources (?) (I've never edited that file) will make the thing work as "advertised".

http://anti.teamidiot.de/nei/2010/02/xmessage_utf8/

I'm dubious about setting any option in my system before having any more information about what it really serves for.

BTW, very instructive this discussion about terminals emulators, encodings, man pages... a little too much technical for me, I must admit. I'll have a look at your recommendations.

Last edited by PreguntoYo; 11-25-2014 at 01:11 PM.
 
Old 11-25-2014, 02:02 PM   #18
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
Here's my xmessage resources (for $HOME/.Xresources). I just added international: to see if it works, and it does.
Code:
! xmessage

Xmessage*font: -*-dejavu sans mono-*-*-*-*-*-140-*-*-*-*-*-*
! Xmessage.geometry: -0+0
Xmessage.center: true
Xmessage.Form.Command.shapeStyle: Rectangle
Xmessage.Form.okay.foreground: green
Xmessage.Form.cancel.foreground: red
Xmessage.Form.?.foreground: #a0c0e0
Xmessage*background: black
Xmessage*foreground: #a0c0e0
Xmessage*defaultButton: okay
Xmessage*international: true
Unfortunately, "international: true" seems to break Xmessage*font's ability to set the font. I'm guessing that either there's a separate resource to specify the international mode font, or I'm missing something else. 'xmessage' doesn't seem particularly well documented, so I'm having a hard time finding it.

fc-list | xmessage -file - is a good way of testing.

Update: I was right, looks like *international:true uses *fontSet rather than *font.
Had a brief play around, seems to work ok, but it seems that running xmessage under en_GB.utf-8 results in a larger line spacing than en_GB.iso8859-*, and I've not figured that one out yet.

Last edited by GazL; 11-25-2014 at 05:53 PM.
 
Old 11-25-2014, 05:37 PM   #19
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,176

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by PreguntoYo View Post
Hello:

I'm setting my own minimalistic desktop, based on Fluxbox.

There are various terminal emulators that come installed with Slackware: Konsole, Xfce's Terminal... I don't want to use these, they're tied (?) to their respective desktop environments.

I've been trying xterm and rvxt (this last only a little), but they don't seem to display utf-8 characters well. Midnight Commander is unusable, man pages show strange characters where accented vowels should go. Hell, there are strange chars shown even when xmessage tries to display the "About Fluxbox" in my language.

I don't know if all these strange symptoms are all caused by one or more misconfigured options. I thought it could be the terminal emulator, at least. I'm unsure about xmessage.

I have the LANG variables in lang.sh and lang.csh set to es_ES.utf8. Also I have set the XkbLayout to "es" in the /etc/X11/xorg.conf.d/90-keyboard-layout.conf file. I don't know if I could do anything else.

Do you know if the problem would be only in the terminal emulator?. If so, which one would you suggest?. Could I just solve my problems setting some mystical option out there?.

I'm clueless Help needed.
As astrogeek suggests, use rxvt-unicode. If you want a terminal multiplexer as well - which allows you, among other things, to create multiple windows and/or panes within your terminal emulator - then use tmux in addition to rxvt-unicode. Google "tmux tutorial".

~/.Xresources is a file which is used to configure the appearance of X programs - xterm, rxvt-unicode, xpdf, xclock, xcalc, and so on. On first run rxvt-unicode starts with a bland set of colours and fonts, but it can be customized to your liking, by editing ~/.Xresources. The Arch wiki has a good introduction to this.

DejaVu is a good terminal font if you need more than what the standard ASCII scheme offers.

If you make changes to your .Xresources file and want to load them on the fly you can do so as follows:

Code:
xrdb ~/.Xresources
 
Old 12-02-2014, 07:32 AM   #20
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,048

Rep: Reputation: Disabled
Quote:
Originally Posted by GazL View Post
'man' seems to cause problems for me using the terminus font on a virtual console. In a utf-8 locale man/groff appears to use 'hyphen' (U+2010) when it needs to split a word at a line end. A iso8859-1 locale appears to generate a 'hyphen-minus' (U+002D) for this; both despite their being a 'soft-hyphen' (U+00AD) in both unicode and 8859-1 encodings intended specifically for this purpose! (oh well. ).
Out of curiosity I just opened the source tarball of groff-1.22.3 (just upgraded in -current) and found this in the file named PROBLEMS:
Code:
* The UTF-8 output of grotty has strange characters for the minus, the
  hyphen, and the right quote.  Why?

The used Unicode characters (U+2212 for the minus sign and U+2010 for
the hyphen) are the correct ones, but many programs can't search them
properly.  The same is true for the right quote (U+201D).  To map
those characters back to the ASCII characters, insert the following
code snippet into the `troffrc' configuration file:

.if '\*[.T]'utf8' \{\
.  char \- \N'45'
.  char  - \N'45'
.  char  ' \N'39'
.\}
If not that, something similar?

More generally, this file is worth reading IMHO.

Last edited by Didier Spaier; 12-02-2014 at 07:36 AM.
 
1 members found this post helpful.
Old 12-02-2014, 07:49 AM   #21
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
Thanks Didier, I solved the hyphen issue by mapping u2010 to u002d in the fonts unicode map, which will have the advantage of also working for programs other than man/troff that may end up throwing a u2010 at the console driver, so I'm happy with the solution I have, but thanks for the info: it's good to know how to do this for troff itself, and it made me aware of the other two affected characters, so I'll probably do something similar for those in my unicode map.
 
Old 12-02-2014, 10:37 AM   #22
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
You might consider using Freetype ttf font in Xterm.
find some of your favour unicode ttf and put following in your .Xresources:

XTerm*faceName:
Xterm*faceSize:

http://www.x.org/archive/X11R6.7.0/doc/xterm.1.html
 
Old 12-02-2014, 11:16 AM   #23
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,048

Rep: Reputation: Disabled
I highly recommend the DejaVu font collection for nearly all alphabetic scripts, see the documents in /usr/doc/dejavu-fonts-ttf-2.34, especially README, langcover.txt and unicover.txt.

The great advantage of using true type fonts is that they are fully scalable, i.e. you can get exactly the size you want. Only limit: the dimensions (height and length) of a single character shouldn't exceed that of the screen

The TTY fonts can also be used on a console (without X) if you use e.g. fbterm

Of course people reading Chinese can get 35000+ more glyphs using the WenQuanYi Zen Hei font see the documents in /usr/doc/wqy-zenhei-font-ttf-0.8.38. There are others, see in the directories listed with ls /usr/doc|grep ttf.

BTW thanks to Alien BOB who introduced material for CJK in Slackware.

Last edited by Didier Spaier; 12-02-2014 at 11:18 AM.
 
  


Reply

Tags
terminal


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
Full featured UTF-8 terminal emulator Ygrex Linux - Software 19 06-17-2010 09:09 AM
number of Lines displayed in Terminal roadrash Linux - Newbie 1 07-03-2009 06:52 AM
errors displayed in terminal while installing synce-trayIcon akbarbasha Linux - Software 1 04-09-2009 04:51 AM
How to make konsole/terminal and emacs to recognize UTF-8 encoding? chandru.in Linux - Software 3 12-05-2007 10:40 AM
RH9 gnome-terminal cannot display utf-8? kenji1903 Red Hat 0 03-04-2005 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration