Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File.open with ruby on windows with a unicode filename

I have a script running on Ruby 1.9.1 on Windows 7

I've distilled my script down to

File.open("翻譯測試.txt")

and still can't get it to work. I know there are issues with Ruby 1.9 filename handling on windows (Using the Windows ANSI library), but would be happy enough with a work around that is callable from Ruby

like image 379
aussiegeek Avatar asked Nov 14 '22 11:11

aussiegeek


1 Answers

Most of the Unicode changes like file and directory operations have been improved in 1.9.2 (trunk) and other bigger changes will be merged pretty soon.

As bobince pointed out, this was already asked:

Unicode filenames on Windows in Ruby

like image 167
Luis Lavena Avatar answered Dec 25 '22 12:12

Luis Lavena