[#38392] Enumerable#gather_each — Tanaka Akira <akr@...>

ときに、複数行をまとめて扱いたいことがあります。

47 messages 2009/05/09
[#38394] Re: Enumerable#gather_each — ujihisa <ujihisa@...> 2009/05/09

ujihisaと申します。

[#38400] Re: Enumerable#gather_each — Yukihiro Matsumoto <matz@...> 2009/05/09

まつもと ゆきひろです

[#38399] Re: Enumerable#gather_each — "Akinori MUSHA" <knu@...> 2009/05/09

At Sat, 9 May 2009 15:30:20 +0900,

[#38405] Re: Enumerable#gather_each — Tanaka Akira <akr@...> 2009/05/10

In article <86r5yy2nrg.knu@iDaemons.org>,

[#38417] Re: Enumerable#gather_each — "Akinori MUSHA" <knu@...> 2009/05/10

At Sun, 10 May 2009 10:08:47 +0900,

[#38524] [Bug #1503] -Kuをつけた時、/[#{s}]/n と Regexp.new("[#{s}]",nil,"n") で実行結果が異なる — sinnichi eguchi <redmine@...>

Bug #1503: -Kuをつけた時、/[#{s}]/n と Regexp.new("[#{s}]",nil,"n") で実行結果が異なる

8 messages 2009/05/22

[ruby-dev:38368] IO.copy_stream doesn't convert encodings

From: sheepman <sh@...>
Date: 2009-05-04 06:08:18 UTC
List: ruby-dev #38368
こんにちは sheepman です。

毎度細かいことで恐縮ですが。
エンコーディングを指定して open した IO オブジェクトを与えても、
IO.copy_stream がエンコーディングを変換しません。
これは、こういうものでしょうか。

$ cat t.rb
# coding:euc-jp
i = File.open('i.txt', 'r:euc-jp')
o = File.open('o.txt', 'w:sjis')
IO.copy_stream(i, o)

$ cat i.txt
漢字

$ ruby-1.9 -v t.rb
ruby 1.9.2dev (2009-05-02 trunk 23326) [i686-linux]

$ nkf --guess o.txt
EUC-JP

In This Thread

Prev Next