Character set issues in filepath using ruby on XP -


i'm trying file.exist?(file) ruby script doesn't find file because of \, spaces, - , . in filepath. i'm beginner in ruby , need fix this.

i assume has os, more ruby.

file tèst.rb:

puts "hello" puts "smørebrød" 

used in irb:

irb(main):001:0> require "tèst.rb" hello smørebrød 

ruby can include file name tèst.rb fine.

irb(main):005:0> f = file.new("ÅÄÖ.txt") irb(main):006:0> f.each {|l| p l }     "\"hej verden\"\n" 

loading file requested characters , printing lines (p l) works fine. running ruby 1.8.7 on ubuntu linux. rather old ruby.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -