SpringFlowers AutumnMoon wrote:
> Bill Kelly wrote:
> 
>> Note, it doesn't bother me that the filename displays as ???????.txt in 
>> the
>> command window, but rather the issue that ruby seems unable to open
>> a filename it just obtained via Dir[].
>> 
>> So, unless I have bungled my test somehow, it seems likely there is a
>> problem.
>> 
>> If so, as Ryan pointed out, we should move this to the ruby-core list.
> 
> 
> yeah, it looks like the file name is actually stored as ???????.txt, not 
> just when printed out.
> 
> Mr. Park Heesbob had a solution but it involved using Win32.  If Ruby 
> 1.9 can handle it without using Win32 that'd be great.


actually... the solution that Park posted involved

files = `cmd /u /c dir /b `.split("\r\000\n\000")
which is to execute a system exe...  gee...

the complete solution at:
http://www.ruby-forum.com/topic/163681

(need to use the line above and some Win32API calls)


-- 
Posted via http://www.ruby-forum.com/.