Tobes wrote: > Hi there, > > I've been using Iconv with Ruby (OnRails) quite successfully for some > time. We keep text as UTF-8 in our mysql database, and then convert it > using Iconv to ISO-8859-1 when rendering PDF files in English, Danish, > French or Dutch. Conversions work well, and RPDF outputs the converted > text nicely. > > However, we now want to output PDFs in ISO-8859-2. For some reason the > output is garbled, see here: > > http://www.tobinharris.com/media/mtq38.jpg > > I just don't get it, can anyone see what might be happening? Is there a > known issue with converting UTF-8 to 8859-2? No, the problem is that PDF::Writer thinks that it is encoded in "WinAnsiEncoding". See the manual[1], page 5. Try to pass to the writer a text encoded in UTF16-BE (manual, page 7), or provide a custom mapping between byte codes and characters (page 6). Good luck. 1: http://ruby-pdf.rubyforge.org/pdf-writer/manual/manual.pdf --