Project

General

Profile

Actions

Bug #1353

closed

io does not convert str when ext == intern

Bug #1353: io does not convert str when ext == intern

Added by sheepman (Takashi Tamura) over 16 years ago. Updated over 14 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-07-06 trunk 23971) [x86_64-freebsd7.2]
Backport:
[ruby-dev:38278]

Description

=begin
こんばんは sheepman です。

IO の外部エンコーディングと内部エンコーディングが等しい場合に、
変換が必要な場合でも、変換が起きません。

$ cat t.rb

encoding:euc-jp

io = File.open('t.txt', 'w+', { :internal_encoding => "SJIS" } )
io.write("ほげ")

$ ruby-1.9 -v -Esjis t.rb
ruby 1.9.2dev (2009-04-04 trunk 23134) [i686-linux]

$ nkf --guess t.txt
EUC-JP
=end

Actions

Also available in: PDF Atom