[Win32utils-devel] [ win32utils-Bugs-29645 ] Fixes for: Char encode error & Dir::WINDOWS error

noreply at rubyforge.org noreply at rubyforge.org
Tue Sep 18 18:17:28 UTC 2012


Bugs item #29645, was opened at 2012-09-18 13:17
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=29645&group_id=85

Category: win32-shortcut
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: Harrison Uhl (harriso_uhl)
Assigned to: Nobody (None)
Summary: Fixes for: Char encode error & Dir::WINDOWS error

Initial Comment:
Using Ruby 1.9.3 on Windows Vista

In trying example_shortcut.rb I kept getting Encoding errors.  I got past this by adding .encode("UTF-8") to Dir::DESKTOP  and  Dir::WINDOWS
 e.g. Dir::WINDOWS.encode("UTF-8")

I also found that the line:
   s.path = "c:\" << Dir::WINDOWS.encode("UTF-8") << "\notepad.exe"

added an extra c:\ at the start of the string -- which caused a 'method not found' error in the underlying shortcut.rb line 138.  Removing the extra c:\ got rid of the problem.  (I don't know if the extra c:\ is present for older Ruby or Windows.)

With the above changes I was able to create a shortcut.

If my fixes are appropriate, could someone please add them to the code base.

Thanks

Harrison

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=411&aid=29645&group_id=85


More information about the win32utils-devel mailing list