Date: Mon, 5 May 1997 13:26:44 +0200 (MET DST) From: Andreas Haakh <ah@alvman.RoBIN.de> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/3506: bin Message-ID: <199705051126.NAA07496@alvman.RoBIN.de> Resent-Message-ID: <199705051130.EAA19455@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 3506 >Category: bin >Synopsis: more did not show iso-8859-n characters >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 5 04:30:01 PDT 1997 >Last-Modified: >Originator: Andreas Haakh >Organization: Andreas Haakh * Steinackerstr. 6 * 64285 Darmstadt * ah@alvman.RoBIN.de http://www.RoBIN.de für privaten Internet-Zugang in Darmstadt/Rödermark http://www.FreeBSD.org freies Berkley-Unix für Intel-Architektur(>=80386). >Release: FreeBSD 2.1.6-RELEASE i386 >Environment: >Description: More did not display iso-8859-n characters. Instead they were converted to ^something. >How-To-Repeat: Just page some code containig german special characters >Fix: I included a call to setlocale and corrected one line in less.h in the following patch diff -rC3 more/less.h more.new/less.h *** more/less.h Mon May 5 13:12:51 1997 --- more.new/less.h Mon May 5 13:05:20 1997 *************** *** 47,53 **** #define BO_CHAR '\203' /* Enter boldface mode */ #define BE_CHAR '\204' /* Exit boldface mode */ ! #define CONTROL_CHAR(c) (!isprint(c)) #define CARAT_CHAR(c) ((c == '\177') ? '?' : (c | 0100)) #define TOP (0) --- 47,53 ---- #define BO_CHAR '\203' /* Enter boldface mode */ #define BE_CHAR '\204' /* Exit boldface mode */ ! #define CONTROL_CHAR(c) (iscntrl(c)) #define CARAT_CHAR(c) ((c == '\177') ? '?' : (c | 0100)) #define TOP (0) diff -rC3 more/main.c more.new/main.c *** more/main.c Mon May 5 13:12:30 1997 --- more.new/main.c Mon May 5 12:54:31 1997 *************** *** 51,56 **** --- 51,57 ---- #include <sys/file.h> #include <stdio.h> #include <less.h> + #include <locale.h> int ispipe; int new_file; *************** *** 251,256 **** --- 252,259 ---- { int envargc, argcnt; char *envargv[2], *getenv(); + + (void)setlocale(LC_ALL, ""); /* * Process command line arguments and MORE environment arguments. > >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705051126.NAA07496>