fix conv_to_fw.rb to handle unsupported character code

TO BE FIXED