0

I do not succeed to store my file with a filename that contain non ascii char.

I use storbinary("STOR #{remotefile}", data, 512, &block), with this filename Filename_Mémo.pdf but the result on the FTP is Filename_Mémo.pdf

Any Idea ? Thanks.

Safi Nettah
  • 1,160
  • 9
  • 15
  • 1
    That's the result of (mis)interpreting UTF-8 as ISO 8859-1 (or vice-versa, depending on your point of view). – Stefan Apr 10 '18 at 15:32
  • Can you be more specific about what "the result on the FTP" means? After you store the file, how are you viewing its name and seeing the wrong characters? Can you be sure the problem is in the storing and not the viewing? – Jordan Running Apr 10 '18 at 15:55
  • 1
    Thanks @Stefan, solved with this answer https://stackoverflow.com/questions/31644103/ruby-converting-string-encoding-from-iso-8859-1-to-utf-8-not-working – Safi Nettah Apr 10 '18 at 15:55

0 Answers0