[Win32utils-devel] Fwd: BUG? Win32::Service.create calling CreateServiceW
djberg96 at gmail.com
Wed Jan 14 08:02:35 EST 2009
Joe Swatosh wrote:
> Hi Dan,
> When we upgraded win32-process to 0.6.0, we had to upgrade some dependencies.
> Now we are getting failures when invoking Win32::Service.create in code that
> used to work. After looking in the registry and futzing around with the code,
> it appears that when Win32::Service.create calls CreateService, ultimately
> CreateServiceW is being called.
> I added this to the file before we invoke anything in Win32::Service, and our
> app seems to be working again:
> class Win32::Service
> def CreateService(*a)
> def self.OpenService(*a)
> But is obviously not a real solution.
Thanks for the report. If you're calling the 'W' methods it means you're
running with $KCODE set to UTF8.
> As an aside, we seem to be having failures when calling Process.create, but
> need to do more research (some calls fail while others work). This is a Rails
> app, so maybe ActiveSupport require magic could be changing the order of the
> I think these are the relevant gem versions:
Probably caused by $KCODE being set to UTF8.
What do people think. Should I remove that logic from win32-api
altogether? It seems to cause more trouble than it's worth.
More information about the win32utils-devel