Project

General

Profile

Actions

Bug #8677

closed

$LOAD_PATH did not encoded into the "internal encoding"

Added by jiayp@glodon.com (贾 延平) over 10 years ago. Updated almost 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p277 (2013-07-23 revision 42121) [i386-mingw32]
Backport:
[ruby-core:56139]

Description

=begin
When I use utf-8 as the internal encoding, and I require some file with Chinese name,and the require failure with:
(({E:/code/rubyinstaller-master/sandbox/ruby19_mingw/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require': incompatible character encodings: UTF-8 and GBK (Encoding::CompatibilityError)}))

I encode the $LOAD_PATH to utf-8 encoding And the problem gone.

So I think we should encoding the $LOAD_PATH into the internal encoding.

Is it right?
If so,I will try to create a patch.I not,please tell me the right way.

thanks a lot
=end


Files

loadpath.patch (552 Bytes) loadpath.patch jiayp@glodon.com (贾 延平), 08/11/2013 03:19 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0