misc/114578: wide character printing using swprintf(dst, n,
"%ls", txt) fails depending on LC_CTYPE
David Schultz
das at FreeBSD.org
Tue Jan 15 01:30:06 PST 2008
The following reply was made to PR kern/114578; it has been noted by GNATS.
From: David Schultz <das at FreeBSD.ORG>
To: Christoph Mallon <christoph.mallon at FreeBSD.ORG>
Cc: freebsd-gnats-submit at 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.
More information about the freebsd-standards
mailing list