From owner-freebsd-standards@FreeBSD.ORG Tue Jan 15 09:30:06 2008 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F98616A41A for ; Tue, 15 Jan 2008 09:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AE28E13C47E for ; Tue, 15 Jan 2008 09:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0F9U5g4090220 for ; Tue, 15 Jan 2008 09:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0F9U5ZB090217; Tue, 15 Jan 2008 09:30:05 GMT (envelope-from gnats) Date: Tue, 15 Jan 2008 09:30:05 GMT Message-Id: <200801150930.m0F9U5ZB090217@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: David Schultz Cc: Subject: Re: misc/114578: wide character printing using swprintf(dst, n, "%ls", txt) fails depending on LC_CTYPE X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: David Schultz List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2008 09:30:06 -0000 The following reply was made to PR kern/114578; it has been noted by GNATS. From: David Schultz To: Christoph Mallon Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: misc/114578: wide character printing using swprintf(dst, n, "%ls", txt) fails depending on LC_CTYPE Date: Tue, 15 Jan 2008 04:25:34 -0500 fputwc(3) has similar language about copying the character to the output stream, but POSIX still says it can fail with EILSEQ if the wide character doesn't exist in the current locale. This isn't my area of expertise, but the present behavior seems correct. If the current locale doesn't support a given wide character, we should not invent a multibyte character sequence for it, because the other end of the stream may not even be able to interpret it.