From owner-freebsd-stable Mon Apr 1 12:48:47 1996 Return-Path: owner-stable Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA27484 for stable-outgoing; Mon, 1 Apr 1996 12:48:47 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA27466 for ; Mon, 1 Apr 1996 12:48:38 -0800 (PST) Received: from DBSTU1.RZ.TU-BS.DE (dbstu1.rz.tu-bs.de [134.169.1.1]) by who.cdrom.com (8.6.12/8.6.11) with SMTP id MAA15937 for ; Mon, 1 Apr 1996 12:48:32 -0800 Received: from malibu.ts.rz.tu-bs.de by DBSTU1.RZ.TU-BS.DE (IBM VM SMTP V2R2) with TCP; Mon, 01 Apr 96 22:43:03 MEZ Received: from localhost (localhost [127.0.0.1]) by malibu.ts.rz.tu-bs.de (8.7.5/8.6.12) with SMTP id NAA00736 for ; Mon, 1 Apr 1996 13:51:34 +0200 (MET DST) Message-Id: <199604011151.NAA00736@malibu.ts.rz.tu-bs.de> X-Authentication-Warning: malibu.ts.rz.tu-bs.de: Host localhost [127.0.0.1] didn't use HELO protocol To: freebsd-stable@freebsd.org Subject: fmt eats umlauts Reply-To: M.Butkus@tu-bs.de Date: Mon, 01 Apr 1996 13:51:32 +0200 From: Martin Butkus Sender: owner-stable@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I've found a bug in /usr/bin/fmt. It ignores the locale set by LANG so that isprint() returns false for all the special characters such as german umlauts. This results in such characters being ommited in the output of fmt. This patch (applied to -stable patchlevel 62) fixes the problem: --- begin --- *** /usr/src/usr.bin/fmt/fmt.c Tue May 30 08:30:18 1995 --- ./fmt.c Mon Apr 1 13:44:35 1996 *************** *** 43,48 **** --- 43,49 ---- #include #include + #include /* * fmt -- format the concatenation of input files or standard input *************** *** 84,89 **** --- 85,91 ---- register int errs = 0; int number; /* LIZ@UOM 6/18/85 */ + (void)setlocale(LC_ALL,""); goal_length = GOAL_LENGTH; max_length = MAX_LENGTH; setout(); --- end --- Maybe it should be integrated into -stable. Comments? -- Martin Butkus >>> Live long and prosper. <<< Phone/Fax: +49.5331.298710 Am Stadtwege 10, 38304 Wolfenbuettel, Germany