mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* include/ruby/encoding.h (rb_econv_t): new field: flags. (rb_econv_binmode): declared. * io.c (io_unread): text mode hack removed. (NEED_NEWLINE_DECODER): defined. (NEED_NEWLINE_ENCODER): defined. (NEED_READCONV): defined. (NEED_WRITECONV): defined. (TEXTMODE_NEWLINE_ENCODER): defined for windows. (make_writeconv): setup converter with TEXTMODE_NEWLINE_ENCODER for text mode. (io_fwrite): use NEED_WRITECONV. character code conversion is disabled if fptr->writeconv_stateless is nil. (make_readconv): setup converter with ECONV_UNIVERSAL_NEWLINE_DECODER for text mode. (read_all): use NEED_READCONV. (appendline): use NEED_READCONV. (rb_io_getline_1): use NEED_READCONV. (io_getc): use NEED_READCONV. (rb_io_ungetc): use NEED_READCONV. (rb_io_binmode): OS-level text mode test removed. call rb_econv_binmode. (rb_io_binmode_m): call rb_io_binmode_m with write_io as well. (rb_io_flags_mode): return mode string including "t". (rb_io_mode_flags): detect "t" for text mode. (rb_sysopen): always specify O_BINARY. * transcode.c (rb_econv_open_by_transcoder_entries): initialize flags. (rb_econv_open): if source and destination encoding is both empty string, open newline converter. last_tc will be NULL in this case. (rb_econv_encoding_to_insert_output): last_tc may be NULL now. (rb_econv_string): ditto. (output_replacement_character): ditto. (transcode_loop): ditto. (econv_init): ditto. (econv_inspect): ditto. (rb_econv_binmode): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
||
|---|---|---|
| .. | ||
| trans | ||
| ascii.c | ||
| big5.c | ||
| cp949.c | ||
| depend | ||
| encdb.c | ||
| euc_jp.c | ||
| euc_kr.c | ||
| euc_tw.c | ||
| gb2312.c | ||
| gb18030.c | ||
| gbk.c | ||
| iso_2022_jp.h | ||
| iso_8859_1.c | ||
| iso_8859_2.c | ||
| iso_8859_3.c | ||
| iso_8859_4.c | ||
| iso_8859_5.c | ||
| iso_8859_6.c | ||
| iso_8859_7.c | ||
| iso_8859_8.c | ||
| iso_8859_9.c | ||
| iso_8859_10.c | ||
| iso_8859_11.c | ||
| iso_8859_13.c | ||
| iso_8859_14.c | ||
| iso_8859_15.c | ||
| iso_8859_16.c | ||
| koi8_r.c | ||
| koi8_u.c | ||
| make_encdb.rb | ||
| make_encmake.rb | ||
| Makefile.in | ||
| prelude.rb | ||
| shift_jis.c | ||
| unicode.c | ||
| us_ascii.c | ||
| utf_7.h | ||
| utf_8.c | ||
| utf_16be.c | ||
| utf_16le.c | ||
| utf_32be.c | ||
| utf_32le.c | ||
| windows_1251.c | ||