From: nobu@... Date: 2017-10-21T16:06:18+00:00 Subject: [ruby-core:83469] [Ruby trunk Bug#8789][Closed] File.expand_path(File.dirname(__FILE__)) return wrong encoded result Issue #8789 has been updated by nobu (Nobuyoshi Nakada). Description updated Status changed from Open to Closed Fixed already. ---------------------------------------- Bug #8789: File.expand_path(File.dirname(__FILE__)) return wrong encoded result https://bugs.ruby-lang.org/issues/8789#change-67470 * Author: jiayp@glodon.com (��� ������) * Status: Closed * Priority: Normal * Assignee: * Target version: 2.2.0 * ruby -v: ruby 2.1.0dev (2013-08-10 trunk 42491) [i386-mingw32] * Backport: ---------------------------------------- A test.rb in a nonascii path with the follow content: ```ruby puts File.expand_path(File.dirname(__FILE__)).encoding ``` Run it with utf-8 as internal encoding. expect result: UTF-8 actual result���US-ASCII Tested on windows 7. I submited a patch to fix this problem but in a wrong way, check it(https://bugs.ruby-lang.org/issues/8774), hope it can help to fix this problem. -- https://bugs.ruby-lang.org/ Unsubscribe: