On Mon, Sep 22, 2008 at 10:38 AM, Seth Thomas Rasmussen
<[EMAIL PROTECTED]> wrote:
> On Mon, Sep 22, 2008 at 1:14 AM, _why <[EMAIL PROTECTED]> wrote:
>> On Sun, Sep 21, 2008 at 04:00:42PM -0400, Seth Thomas Rasmussen wrote:
>>> My app crashes when trying to render this text with the latest Shoes
>>> and OS X 10.4.11:
>>>
>>> "Rails Summit Latin America - Oct 15-16, 2008 - S\343o Paulo, Brasil -
>>> http://tinyurl.com/3rcv62";
>>
>> This is latin-1 encoding.  Try the string:
>>
>>  "Rails Summit Latin America - Oct 15-16, 2008 - S\xC3\xA3o Paulo, Brasil -
>>  http://tinyurl.com/3rcv62";
>
> Aha. I am clearly no master of encodings. Twitter API gives one HTML
> entities for these special characters for some reason, so I was just
> doing ye old CGI.unescapeHTML() and hoping for the best.

For what it's worth, I had added code to use this library but
commented it out.. http://po-ru.com/projects/html-entities/

Took the plunge, and some things are improved, although I am still
having problems with some Japanese characters it seems. Maybe just a
font problem.

HTMLEntities decodes to UTF though, so it's a better situation than CGI I think.

-- 
Seth Thomas Rasmussen
http://greatseth.com

Reply via email to