Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 1999 16:58:52 +0700 (KRAT)
From:      Eugeny Grosbein <eugen@pal.svznov.kemerovo.su>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/15301: Bug in /usr/sbin/syslogd: strips 8th bits, breaking NLS
Message-ID:  <199912060958.QAA81269@pal.svznov.kemerovo.su>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec  6 02:10:01 PST 1999
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912060958.QAA81269>