This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with displaying graphical chars in mc under rxvt (CYGWIN=codepage:oem didnt fix it)


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]