invalid argument for file creating

hi
  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:

hi
  can you help me? thank you!

hi
   is there any method to do it? thank you!

I don't have any direct experience with this, but perhaps you could
begin isolating the problem by trying to directly pass a hard-coded
string as in
     File.open("this_is_the_title.lrc","w"),
sidestepping the filename creation process.

Phillip wrote:

I don't have any direct experience with this, but perhaps you could
begin isolating the problem by trying to directly pass a hard-coded
string as in
     File.open("this_is_the_title.lrc","w"),
sidestepping the filename creation process.

Thank you,phillip.I am driven mad by those characters and encoding.