Date: Sun, 17 Sep 1995 13:04:17 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: hackers@freebsd.org Subject: Policy on printf format specifiers? Message-ID: <199509172004.NAA06540@phaeton.artisoft.com>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509172004.NAA06540>