file.c: use rb_str_conv_enc

* file.c (rb_str_encode_ospath): simplify using rb_str_conv_enc().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_require.rb: split

* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
  split test body.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
load.c: search in OS path encoding

* load.c (rb_load_internal): use rb_load_file_str() to keep path
  encoding.
* load.c (rb_require_safe): search in OS path encoding for Windows.
* ruby.c (rb_load_file_str): load file with keeping path encoding.
* win32/file.c (rb_file_load_ok): use WCHAR type API assuming incoming
  path is encoded in UTF-8.  [ruby-core:56136] [Bug #8676]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e