From: Daniel Jonson Date: 2010-06-13T09:20:51+09:00 Subject: require fails when requiring scripts with utf-8 filenames. Hi, I have a small problem with requiring files with utf-8 character in the filename. I have a small script which does nothing but require another file that has some norwegian utf-8 characters in its filename. shouldnt this work nicely? My enviroment is: mac os x 10.6.3 ruby-1.9.1-p378 locale is set to: LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL= Textmate is set to utf-8. puts __ENCODING__ says UTF-8: hmm. everything seems to be set correctly but when I try require "淡l淡l淡l淡l淡l" it fails with: ruby-1.9.1-p378 > require "淡l淡l淡l淡l" Encoding::CompatibilityError: incompatible character encodings: UTF-8 and US-ASCII from (irb):1:in `require' from (irb):1 from /usr/local/rvm/rubies/ruby-1.9.1-p378/bin/irb:17:in `
' and 淡l淡l淡l淡l.rb is simple: # encoding: utf-8 puts "淡l淡l淡l淡l" Any suggestions? isnt utf-8 filenames supported? surely it must be? thanx! -- Posted via http://www.ruby-forum.com/.