The wasi-io stream types are byte streams capable of transmitting any data encoding, including any text encoding.
However, sometimes an implementation knows the a particular data source or destination uses text data of a particular encoding, for example in an implementation of the stdio streams on Windows. In these cases, it's useful to have the implementation transcode the data, so that guest code doesn't need to be aware of where the data is coming from or going to, and have extra code for performing transcoding itself.
Specify UTF-8 as the encoding to use, when transmitting data from sources or to destinations where the implementation knows the data is in a text format.
The wasi-io stream types are byte streams capable of transmitting any data encoding, including any text encoding.
However, sometimes an implementation knows the a particular data source or destination uses text data of a particular encoding, for example in an implementation of the stdio streams on Windows. In these cases, it's useful to have the implementation transcode the data, so that guest code doesn't need to be aware of where the data is coming from or going to, and have extra code for performing transcoding itself.
Specify UTF-8 as the encoding to use, when transmitting data from sources or to destinations where the implementation knows the data is in a text format.