[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Dear Ruby developers and users!

8 messages 2009/04/17

[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>

Feature #1408: 0.1.to_r not equal to (1/10)

19 messages 2009/04/26

[ruby-core:23119] internal_encoding() and write()

From: James Gray <james@...>
Date: 2009-04-04 22:07:30 UTC
List: ruby-core #23119
I'm I correct that internal_encoding isn't needed at all when writing  
to an IO?  The conversion seems to happen automatically.  For example,  
this:

   # encoding: UTF-8
   open("data.txt", "w:UTF-16LE:UTF-8") do |file|
     data = "My data
     file.puts data
   end

seems to produce the same output as when I leave out the second  
encoding:

   # encoding: UTF-8
   open("data.txt", "w:UTF-16LE") do |file|
     data = "My data
     file.puts data
   end

Is internal_encoding() for reading only?

James Edward Gray II

In This Thread

Prev Next