From eugen@pal.svznov.kemerovo.su Mon Dec  6 02:00:01 1999
Return-Path: <eugen@pal.svznov.kemerovo.su>
Received: from pal.svznov.kemerovo.su (pal.svznov.kemerovo.su [193.125.140.95])
	by hub.freebsd.org (Postfix) with ESMTP id 31C4614F25
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Dec 1999 01:59:48 -0800 (PST)
	(envelope-from eugen@pal.svznov.kemerovo.su)
Received: (from root@localhost)
	by pal.svznov.kemerovo.su (8.9.3/8.9.3) id QAA81269;
	Mon, 6 Dec 1999 16:58:52 +0700 (KRAT)
	(envelope-from eugen)
Message-Id: <199912060958.QAA81269@pal.svznov.kemerovo.su>
Date: Mon, 6 Dec 1999 16:58:52 +0700 (KRAT)
From: Eugeny Grosbein <eugen@pal.svznov.kemerovo.su>
Reply-To: eugen@pal.svznov.kemerovo.su
To: FreeBSD-gnats-submit@freebsd.org
Subject: Bug in /usr/sbin/syslogd: strips 8th bits, breaking NLS
X-Send-Pr-Version: 3.2

>Number:         15301
>Category:       bin
>Synopsis:       Bug in /usr/sbin/syslogd: strips 8th bits, breaking NLS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec  6 02:10:01 PST 1999
>Closed-Date:    Fri Jun 15 22:23:29 PDT 2001
>Last-Modified:  Fri Jun 15 22:23:59 PDT 2001
>Originator:     Eugeny Grosbein
>Release:        FreeBSD 3.3-STABLE i386
>Organization:
Svyaz Service Co.
>Environment:
Fresh installation of FreeBSD 3.3-RELEASE, cvsup'd
                 to 3.4-RC 6 Dec 1999

>Description:

/usr/sbin/syslogd strips 8th bits from characters. That makes messages 
written in Russian (I suppose other non-English messages are affected too)
unreadable.

>How-To-Repeat:

1. Follow instructions in /usr/share/doc/handbook/l10n.html
  and setup KOI8-R locale for console.
2. Say 'logger -s some_russian_words'
3. You will have non-broken line at stdout and broken one (all 8th bits
cleaned) in /var/log/messages

>Fix:

Here is a patch, I use and it's all right; however it's annoying
to apply in after each cvsup.

--- syslogd.c.orig	Mon Dec  6 16:42:44 1999
+++ syslogd.c	Mon Dec  6 16:42:58 1999
@@ -559,7 +559,7 @@
 
 	q = line;
 
-	while ((c = *p++ & 0177) != '\0' &&
+	while ((c = *p++) != '\0' &&
 	    q < &line[sizeof(line) - 1])
 		if (iscntrl(c))
 			if (c == '\n')

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mikeh 
State-Changed-When: Fri Jun 15 22:23:29 PDT 2001 
State-Changed-Why:  
Fixed in rev 1.60 of syslogd.c. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=15301 
>Unformatted:
