Dir.getwd's encoding is wrong
See the patch.
I do't know is this the right way,please check it .
#4 [ruby-core:56568] Updated by firstname.lastname@example.org (贾 延平) almost 4 years ago
You mean the code
File.getwd+'some utf-8 file name'
Should raise encoding compitable error?
Where I can see the ruby's internal design principle for encoding?When encode to internal encoding?When do not?
The doc:http://www.ruby-doc.org/core-2.0/Encoding.html say some thing but do not tell why.
#6 [ruby-core:56589] Updated by email@example.com (贾 延平) almost 4 years ago
Maybe I did not speake clearly，When we write ruby code,we should consider the string create is internal encoding by default,and if internal encoding != filesystem encoding when we use the File.getwd result with other strings that will be problem.