https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17097754782013-07-24T12:00:41ZRuby Issue Tracking SystemRuby master - Bug #8677: $LOAD_PATH did not encoded into the "internal encoding"https://bugs.ruby-lang.org/issues/8677?journal_id=406362013-07-24T12:00:41Zjonforums (Jon Forums)
<ul></ul><p>When require fails, is cmd.exe using codepage 936?</p>
<p>What happens when you <code>chcp 65001</code> in cmd.exe but do not encode <code>$LOAD_PATH</code> to utf-8?</p> Ruby master - Bug #8677: $LOAD_PATH did not encoded into the "internal encoding"https://bugs.ruby-lang.org/issues/8677?journal_id=406382013-07-24T12:24:15Zjiayp@glodon.com (贾 延平)yanping_jia@hotmail.com
<ul></ul><p>jonforums (Jon Forums) wrote:</p>
<blockquote>
<p>When require fails, is cmd.exe using codepage 936?<br>
yes</p>
<p>What happens when you <code>chcp 65001</code> in cmd.exe but do not encode <code>$LOAD_PATH</code> to utf-8?<br>
require do work with my patch for bug <a href="https://bugs.ruby-lang.org/issues/8676%EF%BC%8Cand" class="external">https://bugs.ruby-lang.org/issues/8676,and</a> the $LOAD_PATH's encoding is UTF-8.</p>
</blockquote> Ruby master - Bug #8677: $LOAD_PATH did not encoded into the "internal encoding"https://bugs.ruby-lang.org/issues/8677?journal_id=406482013-07-24T20:22:44Zjonforums (Jon Forums)
<ul></ul><blockquote>
<blockquote>
<p>What happens when you <code>chcp 65001</code> in cmd.exe but do not encode <code>$LOAD_PATH</code> to utf-8?<br>
require do work with my patch for bug <a href="https://bugs.ruby-lang.org/issues/8676%EF%BC%8Cand" class="external">https://bugs.ruby-lang.org/issues/8676,and</a> the $LOAD_PATH's encoding is UTF-8.</p>
</blockquote>
</blockquote>
<p>OK. But do either of these also fix this failure?</p>
<ol>
<li>
<code>chcp 65001</code> in cmd.exe, or</li>
<li>use powershell</li>
</ol>
<p>I'm curious whether those quick non-ruby changes also work; simple workarounds that don't require your patch + $LOAD_PATH encoding tweak.</p> Ruby master - Bug #8677: $LOAD_PATH did not encoded into the "internal encoding"https://bugs.ruby-lang.org/issues/8677?journal_id=406522013-07-24T23:17:46Zjiayp@glodon.com (贾 延平)yanping_jia@hotmail.com
<ul></ul><p>jonforums (Jon Forums) wrote:</p>
<blockquote>
<blockquote>
<blockquote>
<p>What happens when you <code>chcp 65001</code> in cmd.exe but do not encode <code>$LOAD_PATH</code> to utf-8?<br>
require do work with my patch for bug <a href="https://bugs.ruby-lang.org/issues/8676%EF%BC%8Cand" class="external">https://bugs.ruby-lang.org/issues/8676,and</a> the $LOAD_PATH's encoding is UTF-8.</p>
</blockquote>
</blockquote>
<p>OK. But do either of these also fix this failure?</p>
<ol>
<li>
<code>chcp 65001</code> in cmd.exe, or</li>
<li>use powershell</li>
</ol>
<p>I'm curious whether those quick non-ruby changes also work; simple workarounds that don't require your patch + $LOAD_PATH encoding tweak.</p>
</blockquote>
<p>chcp 65001 can make the $LOAD_PATH encoding to UTF-8,and use powershell need chcp too.<br>
The patch I mentioned in the other issue is to fix the require path with UTF-8 encoding and NON-ASCII name,and without this patch the $LOAD_PATH is UTF-8 encoding and the required file is UTF-8 encoding too,But can not load file.</p> Ruby master - Bug #8677: $LOAD_PATH did not encoded into the "internal encoding"https://bugs.ruby-lang.org/issues/8677?journal_id=410832013-08-11T15:19:51Zjiayp@glodon.com (贾 延平)yanping_jia@hotmail.com
<ul><li><strong>File</strong> <a href="/attachments/3878">loadpath.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3878/loadpath.patch">loadpath.patch</a> added</li></ul><p>Submit a patch to use rb_str_encode_ospath encode $LOADPATH</p> Ruby master - Bug #8677: $LOAD_PATH did not encoded into the "internal encoding"https://bugs.ruby-lang.org/issues/8677?journal_id=419652013-09-25T12:12:46Zjiayp@glodon.com (贾 延平)yanping_jia@hotmail.com
<ul></ul><p>Hope fix in Ruby 2.1</p> Ruby master - Bug #8677: $LOAD_PATH did not encoded into the "internal encoding"https://bugs.ruby-lang.org/issues/8677?journal_id=978692022-06-08T03:35:39Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Backport</strong> deleted (<del><i>1.9.3: UNKNOWN, 2.0.0: UNKNOWN</i></del>)</li></ul><p>I'm unsure the precise procedure to reproduce the issue, but I couldn't repro it in any way. Maybe fixed by <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: All loaded feature filenames should be in the file system encoding (Closed)" href="https://bugs.ruby-lang.org/issues/18191">#18191</a>? Feel free to ping me if it is not fixed yet.</p>