You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `_O_BINARY`and `_O_TEXT` manifest constants determine the translation mode for files (`_open` and `_sopen`) or the translation mode for streams (`_setmode`).
19
+
The `_O_BINARY`, `_O_TEXT`, `_O_WTEXT`, `_O_U16TEXT`, and `_O_U8TEXT` manifest constants determine the translation mode for files (`_open` and `_sopen`) or the translation mode for streams (`_setmode`).
20
20
21
21
The allowed values are:
22
22
23
23
| Value | Description |
24
24
|---|---|
25
25
|`_O_TEXT`| Opens file in text (translated) mode. Carriage return-line feed (CR-LF) combinations are translated into a single line feed (LF) on input. Line feed characters are translated into CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading, and for reading and writing, `fopen` checks for CTRL+Z at the end of the file and removes it, if possible. It's removed because using the `fseek` and `ftell` functions to move within a file ending with CTRL+Z may cause `fseek` to behave improperly near the end of the file. |
26
+
|`_O_WTEXT`| Opens file in UTF16 (translated) mode. The wide-character versions of the text translations of `_O_TEXT` are supported. |
27
+
|`_O_U16TEXT`| Opens file in UTF16 no BOM (translated) mode. The wide-character versions of the text translations of `_O_TEXT` are supported. |
28
+
|`_O_U8TEXT`| Opens file in UTF8 no BOM (translated) mode. The text translations of `_O_TEXT` are supported. |
26
29
|`_O_BINARY`| Opens file in binary (untranslated) mode. The above translations are suppressed. |
27
30
|`_O_RAW`| Same as `_O_BINARY`. Supported for C 2.0 compatibility. |
0 commit comments