From: Tobes Date: 2007-01-05T19:35:08+09:00 Subject: Re: ruby iconv UTF-8 to ISO-8859-2 (Polish) Carlos wrote: > I still think the problem is not in the iconv library, but in the FPDF one. > Think about it this way: "³" in UTF-8 ([179], byte sequence [194, 179]) > translates to [179] in latin1. "ł" in UTF-8 ([322], byte sequence [197, > 130]) translates to [179] in latin2. Now you provide a string with the byte > 179 to the PDF library. How should it render that byte? As a "³" or as a > "ł"? You must tell it how you want it by telling it which encoding you are > using. If you don't tell it, it assumes you are using latin1; this is why > you see a lot of "³" instead of "ł" in the PDF output at > http://www.tobinharris.com/media/mtq38.jpg . > > The way to tell FPDF to use another encoding (for the PHP version, I suppose > the Ruby one would be similar) is in the link I put in my previous message. Hi Carlos, You're right, the problem was not in Iconv. I guess that is backed up by the fact that Iconv didn't barf during the translation, the PDF output just looked wrong. I've read those instructions, compiled a few fonts with Latin2 encoding, and now I'm getting pretty good looking PDFs! Thank you so much for your help on this one, solving the prob felt like peeling an onion, but it's cool that I'm now able to check things myself. Many many thanks. Tobin > Good luck. > --