From: Richard Conroy Date: 2007-01-04T20:18:37+09:00 Subject: Re: ruby iconv UTF-8 to ISO-8859-2 (Polish) On 1/4/07, Tobes wrote:> Hi Richard,>> Firsly, thanks for the reply! No problem. Double check the point Carlos raised too - you may be usingcp1252 (windows western european) instead of Latin-1. That can makeyour problem a bit worse. > I'm using RPDF and it has never coped with UTF-8 text, therefore I> convert to Latin. Ah. That sucks. > I have a feeling it might be in the database now, as I observed that> the text looks strange even in the MySQL query tool. The problem with most character encoding issues is the round tripconversion - it only takes one dodgy link in the chain to mess everythingup. The database is usually the most straightforward to get right & verify. However, if I> manually enter some text through the tool, it appears ok. See the> bottom entry entitled 'test' here> http://www.tobinharris.com/media/mtq38_db.jpg. The test is ok, but all> the other stuff entered by the client through the web site is not. That doesn't look entirely the part to me. What you want to do is entercharacters into the DB that are unique to (or characteristic of) Polish like:� � �Especially that crossed 'l' : �That will verify if your DB is okay. >> If characters in the DB are not UTF-8, is there any way to convert them> or is the information lost forever? Well they are Latin characters, if they are entered as Latin-1 insteadof Latin-2you might be lucky enough. They are both 8-bit character sets just viewing themas Latin-2 should be enough (the characters are not altered). If theywere enteredas cp1252, it could get a bit painful for you. Its not impossible, but can be tricky. At the end of the day only afinite numberof characters can be corrupted. A careful find/replace could fix the problems. Hint: firefox with itsView > Character Encoding > is your *friend* - simply one of the bestdebugging tools out there. I haven't tried it myself, but a polishspellchecker islikely to be a very good debugging tool too, as encoding errors inpolish text aresubtle (as opposed to eastern asian languages, russian etc.). I generally findlow-tech tools to be the best (like the windows character map). If you have invested heavily in the DB content (e.g. its what your translatorsuse), fixing the content is your best choice.