Q:

rails, wicked-pdf gem and é à ö characters showing incorrectly

When I generate a PDF with text containing characters such as é è à and so on I do get funny characters instead.
I know this must be related to encoding. 
I did try force_encoding("UTF-8") on the string with those characters with no success.
joel 

A:

Add <meta charset="UTF-8"> to the top of your HTML view or in the head of your layout.

A:

You can pass as option:
encoding: 'utf8'

A:

You can also add it as an option in the wickedpdf 
 WickedPdf.new.pdf_from_string(
    render :pdf => "Paper",
    :template => "paper/paper.html",
    :page_size => 'A4',
     formats: :html, encoding: 'utf8',
    :margin => {:top => 40}
  )

