https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112015-02-02T23:12:50ZRuby Issue Tracking SystemRuby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=513442015-02-02T23:12:50Zferventcoder (Rob Reynolds)ferventcoder@gmail.com
<ul></ul><p>Apparently markdown didn't work so well, but hopefully the gist of the issue is captured here.</p> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=513452015-02-02T23:26:57Zferventcoder (Rob Reynolds)ferventcoder@gmail.com
<ul></ul><p>For the issue, without this fix, it is likely not to find registry keys/values that have unicode in them. This is what we were seeing.</p> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=513462015-02-02T23:47:44Zferventcoder (Rob Reynolds)ferventcoder@gmail.com
<ul></ul><p>Looks like you may want to explore the same for <code>RegQueryInfoKey</code> as well. See <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724902.aspx" class="external">https://msdn.microsoft.com/en-us/library/windows/desktop/ms724902.aspx</a></p> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=514502015-02-08T03:32:39Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/51450/diff?detail_id=37039">diff</a>)</li><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> changed from <i>usa (Usaku NAKAMURA)</i> to <i>windows</i></li><li><strong>Backport</strong> changed from <i>2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: REQUIRED</i> to <i>2.0.0: DONTNEED, 2.1: REQUIRED, 2.2: REQUIRED</i></li></ul> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=514512015-02-08T03:49:09Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset r49542.</p>
<hr>
<p>registry.rb: wide versions</p>
<ul>
<li>ext/win32/lib/win32/registry.rb (Win32::Registry::API): use wide<br>
versions of RegDeleteValue and RegDeleteKey.<br>
<a href="/issues/10820">[ruby-core:67958]</a> [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Win32 Registry Delete uses ANSI instead of Wide APIs (Closed)" href="https://bugs.ruby-lang.org/issues/10820">#10820</a>]</li>
</ul> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=515232015-02-17T06:39:17Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Backport</strong> changed from <i>2.0.0: DONTNEED, 2.1: REQUIRED, 2.2: REQUIRED</i> to <i>2.0.0: DONTNEED, 2.1: REQUIRED, 2.2: DONE</i></li></ul><p>ruby_2_2 r49622 merged revision(s) 49542.</p> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=536382015-08-02T17:31:53ZIristyle (Ethan Brown)ethan_j_brown@hotmail.com
<ul></ul><p>Yui NARUSE wrote:</p>
<blockquote>
<p>ruby_2_2 r49622 merged revision(s) 49542.</p>
</blockquote>
<p>I would like to see this backported to Ruby 2.1 as well. Without it, registry keys and values cannot be deleted at all. This is a fairly large issue on Windows.</p>
<p>Comment left on <a href="https://github.com/ruby/ruby/commit/eef3f0d94cd884a27ed2b9523240370f5e8026f1" class="external">https://github.com/ruby/ruby/commit/eef3f0d94cd884a27ed2b9523240370f5e8026f1</a></p> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=536522015-08-03T02:24:35Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>This issue is marked as ‘2.1: REQUIRED’.</p> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=538102015-08-17T07:15:43Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Backport</strong> changed from <i>2.0.0: DONTNEED, 2.1: REQUIRED, 2.2: DONE</i> to <i>2.0.0: DONTNEED, 2.1: DONE, 2.2: DONE</i></li></ul><p>ruby_2_1 r51596 merged revision(s) 49542.</p> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=985522022-08-01T16:21:42Zheadius (Charles Nutter)headius@headius.com
<ul></ul><p>Late to the party, but why was <code>RegQueryInfoKey</code> also update to use <code>W</code>? I am working on <a href="https://github.com/jruby/jruby/issues/7106" class="external">https://github.com/jruby/jruby/issues/7106</a> and cannot figure out how CRuby manages to locate <code>RegQueryInfoKey</code> when only the <code>A</code> and <code>W</code> versions should exist in the actual DLLs.</p> Ruby master - Bug #10820: Win32 Registry Delete uses ANSI instead of Wide APIshttps://bugs.ruby-lang.org/issues/10820?journal_id=989712022-08-27T14:16:42Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>headius (Charles Nutter) wrote in <a href="#note-10">#note-10</a>:</p>
<blockquote>
<p>Late to the party, but why was <code>RegQueryInfoKey</code> also update to use <code>W</code>?</p>
</blockquote>
<p>It seems unneeded because not using any <code>WCHAR</code> arguments.</p>
<blockquote>
<p>I am working on <a href="https://github.com/jruby/jruby/issues/7106" class="external">https://github.com/jruby/jruby/issues/7106</a> and cannot figure out how CRuby manages to locate <code>RegQueryInfoKey</code> when only the <code>A</code> and <code>W</code> versions should exist in the actual DLLs.</p>
</blockquote>
<p>It's done by fiddle.<br>
<a href="https://github.com/ruby/fiddle/blob/master/ext/fiddle/handle.c#L342-L380" class="external">https://github.com/ruby/fiddle/blob/master/ext/fiddle/handle.c#L342-L380</a></p>