delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/29/23:10:23

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <43643990.C847AAE3@dessent.net>
Date: Sat, 29 Oct 2005 20:10:08 -0700
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: problem with displaying graphical chars in mc under rxvt (CYGWIN=codepage:oem didnt fix it)
References: <20051029092341 DOT 4db64953 DOT pixel12 AT wp DOT pl>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

Andy Kosela wrote:

> I got a problem with displaying graphical characters in mc 4.6.1-2
> under rxvt 2.7.10-6. The lines are screwed up. I tried setting
> CYGWIN=codepage:oem but the problem persists. When I launch bash under
> cmd.com everything is ok with mc. It only happens in rxvt. I'm using
> courier fonts set in ~/.Xdefaults

As far as I understand it the "codepage:" setting for Cygwin is only
relevent when you are talking about a Windows console, i.e. that which
is created by cmd.exe.  When you use rxvt, there is no concept of
setting the code page - this is simply determined by the encoding of the
selected font (at least this is how I understand it.)

The other problem here is that those line drawing characters are part of
a obsolete character set.  Almost everything these days -- or at least
in English locales -- uses the ISO-8859-1 character encoding, or one
based on it such as Windows-1252.  Both of these mappings have no line
drawing characters, but instead they have accented characters in those
code points.  Compare:
<http://www.microsoft.com/globaldev/reference/oem/437.mspx> and
<http://www.microsoft.com/globaldev/reference/sbcs/1252.mspx>.  That is
why you normally see funny accented vowels instead of line drawing
characters when things don't work.

None of this is really directly relevent to your problem, it's just an
artifact of the way that character sets used to work in the dark days of
the original PC, way before Unicode or UTF-8 or any of those types of
modern technologies.

So you have to select a font that is both monospaced, and has the
character glyphs of this ancient dos code character encoding, instead of
the modern one that everything else in the world uses.  The only one I
know of that has this property and that is installed by default on
windows is "Terminal".  Courier will definitely not do because it only
has the Western  (i.e. 8859-1) character encoding.  Note, this is
referring to native windows fonts; if you are using rxvt in X11 mode
then there are probably many more options since the X server should come
with these kinds of ancient fixed size bitmap fonts.  For some reason
that is unknown to me, you also need $TERM set to "rxvt-cygwin" and not
"rxvt".  So combining these, you get:

rxvt -fn Terminal -tn rxvt-cygwin -geometry 80x50 -e mc

...which should show the characters properly.  The -geometry is not
necessary, it's just helpful.  And you can stick all these in an
~/.Xdefaults file if you want so that you don't have to type them every
time.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019