Forum: Ruby on Rails PDFwriter problem with charset

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
brutyn_nick (Guest)
on 2005-12-08 17:42
(Received via mailing list)
hey,

my database had charset latin1, i changed that all to utf8

cuz i had info like
étage => �©tage

and i have changed that to utf8, then when i edit through the site a
location
and enter étage, "étage" will be in the database.

Now my problem is that when i create a pdf, étage is displayed like
�©tage again.
even when i put this in the code
send_data pdf.render, :filename =>"test.pdf", :type =>
"application/pdf;charset=utf-8"


can anyone help me?
halostatue (Guest)
on 2005-12-09 17:24
(Received via mailing list)
On 08/12/05, Brutyn N. <removed_email_address@domain.invalid> wrote:
> my database had charset latin1, i changed that all to utf8

You will need to convert from UTF-8 to Latin 1. PDF::Writer does not
yet support UTF-16, but PDF itself will not support UTF-8 in any case.

-austin
--
Austin Z. * removed_email_address@domain.invalid
               * Alternate: removed_email_address@domain.invalid
This topic is locked and can not be replied to.