From: Ben Schumacher Date: 2002-10-12T06:01:56+09:00 Subject: Re: UTF-8 Character Conversion to HTML -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 matz- It *should* be UTF-8. The actual output comes from a .csv that is saved from an Excel spreadsheet. Since translations are coming from overseas from non-technical people (tranlators), this was the only way to send the data. When I save the CSV, OpenOffice.org adds a little 3-byte identifier to the beginning of the file which I *believe* is what makes the file behave as if encoded in UTF-8, correct? (This is probably the wrong list for this question.) Perhaps its the Ruby CSV module I'm using from RAA that is converting it to ISO-8859-1(5?). Hmm... sorry about leaving details out of earlier message, wanted to get it out... had a meeting to run off to. Any ideas? It appears I am having better luck when running this on my Windows box, but it still doesn't seem to be working 100% of the time. Thanks for your help... I'll take another shot at making sure the input is UTF-8. I guess this means I may have to parse the CSV myself, which I'm not really looking forward to. Cheers, bs. Yukihiro Matsumoto wrote: | Hi, | | In message "UTF-8 Character Conversion to HTML" | on 02/10/12, Ben Schumacher writes: | | |I'm trying to convert some characters from a text file that are | |double-byte characters from Czech and Polish into HTML entities. I have | |a Ruby script that I'm trying to do this with, but when I'm scanning, | |I'm getting several characters, instead of just one. Can somebody help | |me out here? I imagine I'm not doing this in a terribly efficiently | |anyhow, so an optimizations would be appreciated. Here's the text I'm | |converting: | | | | Aguarda carregamento da p�ágina.... | | You have to make sure the encoding of your input. Is it really in | UTF-8? If it's not (I suspect it's in ISO-8859-1), you should convert | them to UTF-8 before applying UTF regexp. | | matz. | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE9pzw9UpoGqensAXIRAswlAKCk54+sh0aQPlDsV6gd0LUzuVsclACgtcVJ QBNXDS4yk9Fgj4uj3yCkLIY= =SkaZ -----END PGP SIGNATURE-----