Feature #802
IO.open optional argument to properly handle BOMs
| Status: | Closed | Start date: | 11/30/2008 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | M17N | |||
| Target version: | 1.9.2 |
Description
Rejectされた[ruby-dev:37075][Feature #747]の続きです。議論の結果IO.open側でBOMを適切に処理するのがよいだろうということになったようです。 なかむら(う)さんの仕様案が[ruby-dev:37081]にあります。
Related issues
| related to ruby-trunk - Feature #747: /\A/u ignores BOM | Rejected | 11/12/2008 | ||
| related to ruby-trunk - Feature #1951: openのBOM指定拡張 | Closed | 08/18/2009 |
Associated revisions
Set encoding and strip bom when modeenc string is "r:foo-bom" [ruby-dev:37236]
* include/ruby/io.h (FMODE_STRIP_BOM): new constant.
* io.c (io_encname_bom_p): judge whether the encoding name
is *-bom or not.
(parse_mode_enc): drop "-bom".
(rb_io_modestr_fmode): set FMODE_STRIP_BOM if needed.
(rb_io_extract_modeenc): ditto.
(io_strip_bom): strip bom if exists.
(io_set_encoding_by_bom): set encoding if there is bom.
History
Updated by Usaku NAKAMURA about 3 years ago
- Assignee changed from Usaku NAKAMURA to Yukihiro Matsumoto
仕様案は出してあるわけなのでacceptかrejectを決定してください。
Updated by Shyouhei Urabe almost 3 years ago
- Target version changed from 2.0.0 to 1.9.2
Updated by Yui NARUSE over 2 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r24001.