Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Conversation

@sunfishcode
Copy link
Member

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.

@sunfishcode sunfishcode reopened this Dec 19, 2023
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.
@sunfishcode sunfishcode force-pushed the sunfishcode/text-encodings branch from ced39bc to 99d9270 Compare December 19, 2023 00:33
@sunfishcode sunfishcode merged commit c9d685b into WebAssembly:main Jan 9, 2024
@sunfishcode sunfishcode deleted the sunfishcode/text-encodings branch January 9, 2024 01:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant