[#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:23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file?

From: =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>
Date: 2009-04-17 10:24:47 UTC
List: ruby-core #23231
Dear Ruby developers and users!

Starting with Ruby 1.9 it can often happen, that the encoding of the 
program source differs from the encoding of required files. This can 
lead to some problems if String constants are passed as parameters or if 
  String constants will be returned.

If Kernel#load and Kernel#require returns the source encoding (the value 
of __ENCODING__) of the required file instead of "true", possible 
problems based on incompatible source encodings can be seen very soon.

In a german Windows environment following encodings are very common and 
the problem is not artificial - Windows_1252, CP850, UTF_8 and ISO8859_1.

What do you think about this?

If it makes sense for you I will write a Proposal.

Wolfgang N疆asi-Donner

In This Thread

Prev Next