From eugen@pal.svznov.kemerovo.su Mon Dec  6 02:00:32 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 8DE2214F25
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Dec 1999 02:00:29 -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 RAA81393;
	Mon, 6 Dec 1999 17:01:39 +0700 (KRAT)
	(envelope-from eugen)
Message-Id: <199912061001.RAA81393@pal.svznov.kemerovo.su>
Date: Mon, 6 Dec 1999 17:01:39 +0700 (KRAT)
From: Eugeny Grosbein <eugen@pal.svznov.kemerovo.su>
Reply-To: eugen@svzserv.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:         15302
>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:02 PST 1999
>Closed-Date:    Mon Dec 6 03:03:12 PST 1999
>Last-Modified:  Mon Dec  6 03:03:39 PST 1999
>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: mpp 
State-Changed-When: Mon Dec 6 03:03:12 PST 1999 
State-Changed-Why:  
Duplicate of PR bin/15301. 
>Unformatted:
