[Rails] Re: UTF8 name not carried into the page cache filename
I have concluded that the problem is not Rails or Rails3. I have come
to believe it is a Ruby problem. I have sent the comments below to a
ruby forum.
------------------------------
Windows XP can create a Résumé.html file but ruby cannot. Why?
The following code created the wrong filename
File.open("Résumé.html","w") { |file| file.write('xxx'); }
Also, this code does not work
str = "Résumé.html"
filename = Iconv.conv('UTF-16','UTF-8',str)
File.open(filename,"w") { |file| file.write('xxx'); }
If I manually rename the file to Résumé.html, it does work.
Setting the $KCODE="u" or $KCODE="UTF8" makes no difference.
Whats wrong with ruby v1.8.7 (or is it me)?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home