< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #9699 has been updated by Usaku NAKAMURA.
memo:
this fix requires at least r42183 (see #8676) for `ruby_2_0_0`.
----------------------------------------
Bug #9699: Cannot require .so file on Windows if the file path is unicode (Includes patch)
https://bugs.ruby-lang.org/issues/9699#change-47339
* Author: Bugra Barin
* Status: Closed
* Priority: Normal
* Assignee: cruby-windows
* Category: platform/windows
* Target version: current: 2.2.0
* ruby -v: 2.0.0 and later
* Backport: 2.0.0: REQUIRED, 2.1: DONE
----------------------------------------
It doesn't seem possible to load a C extension that is inside a non-ascii path.
To reproduce:
- Extract the attached zip file (with a decent unzip program such as 7-zip,that preserves unicode paths)
- cd to where you extracted
- launch irb
- require './foo.rb' (All this does is require a simple so file inside the folder 'てすと')
- You'll see a failure
The culprit is in function dln_load, it uses the ANSI version of LoadLibrary and passes in the char* path given to the function. My patch converts it to wide char and uses LoadLibraryW. I have assumed that the given path is UTF-8 encoded, which seems to work but I am not sure if this is a safe assumption.
I hope the patch is in the right format, I wasn't sure. Thanks for your time!
Bugra
---Files--------------------------------
require_so_bug_win32.zip (16.3 KB)
dln_load.patch (1.41 KB)
--
https://bugs.ruby-lang.org/