Table of Contents
stream_set_character_format
Sets the character format of the stream.
stream_set_character_format(stream, format) stream_set_character_format(stream)
Determines whether the functions that send and receive characters use Unicode UTF8, UTF16 or UTF32 or determine the character format automatically from the first characters read from the stream.
The FORMAT argument may be one of the following values:
'auto' |
= character format is determined from byte order mark (if present) read from the stream. |
'ascii' |
= use the Unicode UTF8 character set (8-bit Unicode) since it is equivalent to ASCII for the first 127 (0x7f) characters |
'unicode' |
= use the Unicode character set native to the operating system. For example, on Windows it will be UTF16 but on Linux it will be UTF8 |
'utf8' |
= use the Unicode UTF8 character set (8-bit Unicode) |
'utf16' |
= use the Unicode UTF16 character set (16-bit Unicode) |
'utf32' |
= use the Unicode UTF32 character set (32-bit Unicode) |
'multibyte' |
= use a multibyte character set (based on current locale and code page) |
This operation is not valid on listening streams created using stream_listen.
stream
Stream handle returned by stream_connect or stream_accept.
format
A string indicating the character format to use. See the Description above for details. If this argument is omitted then it defaults to 'auto'.
This function has no outputs.
stream_set_character_format(stream, 'utf8'); % Sets the character format of the specified stream to UTF-8.
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.