0

I am having difficulty converting UTF-8 byte characters into their actual UTF-8 characters.

I have a downloaded image file called J%C3%83%C2%A4germeister.jpg and I need to have the proper encoding so that the name is: JÃgermeister.jpg

Is there any quick way to convert these to the actual accent chars in Ruby?

I have only managed to gsub each "%C3%83" to the actual letter, but they all have to be done separately so it takes many lines of code.

I have tried:

filename = filename.force_encoding('utf-8')

But nothing changes.

user229044
  • 232,980
  • 40
  • 330
  • 338
user098123
  • 11
  • 4

0 Answers0