mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC] Mention Windows text mode EOF marker interpretation
I don't think this is super well known so it's worth mentioning as it can be a pitfall. See: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=msvc-170 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
parent
f1057393da
commit
ca8daf70fa
Notes:
git
2022-08-06 03:34:33 +09:00
1 changed files with 4 additions and 2 deletions
6
io.c
6
io.c
|
@ -14504,9 +14504,11 @@ set_LAST_READ_LINE(VALUE val, ID _x, VALUE *_y)
|
|||
* Either of the following may be suffixed to any of the string read/write modes above:
|
||||
*
|
||||
* - <tt>'t'</tt>: Text data; sets the default external encoding to +Encoding::UTF_8+;
|
||||
* on Windows, enables conversion between EOL and CRLF.
|
||||
* on Windows, enables conversion between EOL and CRLF and enables interpreting +0x1A+
|
||||
* as an end-of-file marker.
|
||||
* - <tt>'b'</tt>: Binary data; sets the default external encoding to +Encoding::ASCII_8BIT+;
|
||||
* on Windows, suppresses conversion between EOL and CRLF.
|
||||
* on Windows, suppresses conversion between EOL and CRLF and disables interpreting +0x1A+
|
||||
* as an end-of-file marker.
|
||||
*
|
||||
* If neither is given, the stream defaults to text data.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue