Ulrich Drepper wrote on 2000-09-22 17:49 UTC:
> Mixing wide and byte oriented
> functions will (normally) not be checked for since this is just
> punishing correct programs.
How about at least implementing fwide() such that it allows to switch
the orientation of streams (if the distinction of stream orientations is
really necessary at all)? I can very well imagine that other standards
(POSIX, SUS, etc.) will in the future impose additional sensible
implementation requirements on top of the (in this area unfortunately
very sloppy) requirements of ISO C99, and requiring fwide() to actually
work on stdout and stderr for switching the orientation will hopefully
become a requirement soon, otherwise we have to advise categorically
against the use of the wprintf() functions for safety reasons.
> The errors are obvious enough to notice.
Why are they occurring in the first place with stateless encodings? I
don't understand, why there is any need at all to distinguish between a
wide and a byte orientation for streams. All this sounds as useless and
unnecessary as the distinction between text and binary streams, which
fortunately is required to not matter under POSIX, but might matter for
a portable C program that runs on non-POSIX systems such as DOS or
MacOS.
Just because ISO C does not require an implementation to behave
gracefully in certain areas is no reason not to implement graceful and
robust behaviour nevertheless.
Markus
--
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org, WWW: <http://www.cl.cam.ac.uk/~mgk25/>
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/