From owner-freebsd-hackers Sun Sep 17 13:06:08 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA24422 for hackers-outgoing; Sun, 17 Sep 1995 13:06:08 -0700 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id NAA24417 for ; Sun, 17 Sep 1995 13:06:05 -0700 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA06540 for hackers@freebsd.org; Sun, 17 Sep 1995 13:04:18 -0700 From: Terry Lambert Message-Id: <199509172004.NAA06540@phaeton.artisoft.com> Subject: Policy on printf format specifiers? To: hackers@freebsd.org Date: Sun, 17 Sep 1995 13:04:17 -0700 (MST) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1190 Sender: owner-hackers@freebsd.org Precedence: bulk I'd like to add a format specifier '%S' to the list of format specifiers accepted by printf. Well, kernel printf, anyway. It's purpose would be to print wchar_t strings that are "NULL" terminated; the actual output would include the embedded NULL's. This would be true 16 bit character output. I'd also like the wchar_t value to be 16 rather than 32 bits. Other than page 0 (Unicode), no other code pages in ISO-10646 have yet been allocated. This would affect constant ISO 8859-1 strings using the 'L' quailfier; for example: main() { printf( "%S\n", L"Hello World"); } I'd also like to begin discussing word order in wchar_t values; specifically, the generation of a data value for L"Hello World" should put the 'H' in the same byte independent of machine byte order. This will unify the storage encoding so that it is invariant between machines with differning byte orders for NFS mounts of wchar_t containing data files. I suggest network byte order (yes, I know this means byte-swapping in the %S processing code for Intel machines). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.