I use song_title to creat a file named by song_title.I have many song
titles to create many files.but unfortunately,some of song titles
contain special characters,such as [ ,which leads the following error:
Errno::EINVAL in Lyric spiderController#scrap_one_category
Invalid argument - e:/rails/lyric/public/song/e/Energy/
I use the following codes to create and write to files:
It is impossible to drop those special characters individually,and they
are valid file names on my windows system when i manually create the
file using them.
I have used the CGI escape methods,but the resulted filename was not
what i want.
how to keep those characters for file name,and prevent the error