The functions described in the last chapter are defined in Amendment 1 to ISO C90. But the original ISO C90 standard also contained functions for character set conversion. The reason that they are not described in the first place is that they are almost entirely useless.
The problem is that all the functions for conversion defined in ISO C90 use a local state. This implies that multiple conversions at the same time (not only when using threads) cannot be done, and that you cannot first convert single characters and then strings since you cannot tell the conversion functions which state to use.
These functions are therefore usable only in a very limited set of situations. One must complete converting the entire string before starting a new one and each string/text must be converted with the same function (there is no problem with the library itself; it is guaranteed that no library function changes the state of any of these functions). For the above reasons it is highly requested that the functions from the last section are used in place of non-reentrant conversion functions.
Go to the first, previous, next, last section, table of contents.