Hello, On Thu, Jul 10, 2003 at 11:20:06PM -0400, Michael B Allen wrote: > My understanding is that you cannot mix wide character I/O functions like > fputws with regular I/O functions like fputs. I get an ESPIPE trying to do > that.
You can't mix them on the same stream... at least not without using freopen() to reset the stream's orientation. But you can certainly use both types of functions in a given program. For details, see http://www.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_05.html and search for "Stream Orientation and Encoding Rules". Of course, there are error recovery issues with the wide i/o functions that can make their use inadvisable in many situations. But that is a seperate issue. > But can the following four functions be used with non-wide I/O > functions?: > > int swprintf(wchar_t *s, size_t maxlen, const wchar_t *format, ...); > int vswprintf(wchar_t *s, size_t maxlen, const wchar_t *format, va_list arg); > int swscanf(const wchar_t *s, const wchar_t *format, ...); > int vswscanf(const wchar_t *s, const wchar_t *format, va_list arg); > > They don't actually do any I/O but then again they are classified with > functions that do. Again, the limitation is based on a _stream_'s orientation. Since the above functions don't operate on streams, there is no conflict. Manuel -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/
