Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com To: Egor Duda Cc: "Uther Pendragon" Subject: Re: Cygwin Termcap information involving extended ascii charicters References: <000701c09fa5$f874d380$cb0b3ed8 AT dhs DOT org> <56235443650 DOT 20010226105530 AT logos-m DOT ru> <000501c09fcb$f0944440$cb0b3ed8 AT dhs DOT org> <82238417726 DOT 20010226114504 AT logos-m DOT ru> From: Benjamin Riefenstahl Date: 26 Feb 2001 16:00:21 +0100 In-Reply-To: Egor Duda's message of "Mon, 26 Feb 2001 11:45:04 +0300" Message-ID: Lines: 95 User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi all, Short version as Egor writes: Egor Duda writes: > set cygwin default console mode to 'oem' by adding 'codepage:oem' to > your CYGWIN variable [...] Long version: > >> what exactly do you mean by "extended ascii tables" here? if you > >> mean characters with ascii codes 0x80-0xff then no special tty > >> commands are needed to output them in cygwin console: cygwin > >> console is 8-bit one. There is no such thing as "extended ASCII". ASCII is a seven-bit code and pretty clearly defined today with very little variation. There are quite a number of different 8-bit extensions of ASCII in use today. So to talk about a specific one, some more info is needed. > UP> but this means that several programs that use the extended ascii charicters > UP> by changing the charicter set will not, i.e. midnight commander, the colors > UP> and function keys work, but the box and edge graphics wont show correctly, > UP> is there any future plans to correct this? IOW, you are talking about an 8-bit character set containing box drawing characters. That would most likely mean the IBM codepage 437 or the similar codepage 850. These were used in DOS and they are used on Windows in the command console. They are called "OEM codepages" on Windows as opposed to the "ANSI codepages" used by GUI programs and the rest of the system. > Your problem with mc arise from the fact that windows consoles have > 2 modes -- ansi and oem. Close but not quite. There are APIs to set a windows console input and output to any of the installed character sets. This works fine on NT and Windows 2000, but is severely restricted on Windows 9x/Me. There is the user-level command CHCP to change this setting from the command line. By default the console is set to the OEM codepage, that is codepage 437 on american Windows and 850 on most european Windows versions. These character sets contain the box drawing characters that mc would need. On NT/2000 CHCP.COM can be used to set the console to the so-called ANSI codepage (codepage 1252 on western versions of NT). You also need to select a compatible font, of course. The "ANSI codepages" do *not* contain box drawing characters. > To solve your problem you have two options. You can either set > cygwin default console mode to 'oem' by adding 'codepage:oem' to > your CYGWIN variable, or change acsc capability in terminfo entry. This refers to an internal notion of Cygwin programs of the character set used. By default this is set to "codepage:ansi", probably because of a widespread expectation that Latin-1 is the default on any platform ;-). When this internal character set is different from the console character set, the console code in cygwin1.dll will convert between these character sets. This means that with the defaults, mc will output some character code that it expects to mean a drawing character, but cygwin1.dll assumes it means an ANSI codepage character (internal encodeing) and will "convert" it to the appropriate OEM codepage character (console encoding). By setting CYGWIN=codepage:oem this conversion is basically disabled, because than internal encoding == console encoding. > UP> tables.. by standard its usually > UP> "\033[12m" and "\033[11m" > UP> but that doesnt seem to work in cygwin... if you can tell me how > UP> it If these escape sequences are widespread (are they actually?), it may be a good idea to implement them in Cygwin, the implementation itself would be pretty straight forward. Does anybody know where they are documented? so long, benny -- ISION Internet AG Benjamin Riefenstahl mailto:benjamin DOT riefenstahl AT ision DOT net Harburger Schlossstr. 1 D-21079 Hamburg http://www.ision.net -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple