semifor / Net-Twitter

A Perl interface to the Twitter APIs
83 stars 37 forks source link

utf-8 #44

Closed boss1575 closed 10 years ago

boss1575 commented 10 years ago

Hello, exist Error in Update method and update_with_media the posting Encoding in UTF-8. Receive a reply: Status is over 140 characters.

semifor commented 10 years ago

Works for me: https://twitter.com/semifor/status/456097809838931969

That tweet was posted with a 114 character unicode status. Twitter adds 23 characters for the image URL, so the total status text length is 137 characters. UTF-8 encoded, it is 437 bytes.

Make sure you're passing Net::Twitter a decoded character string, not an encode byte string. I.e., utf8::is_utf8($your_status) should return true.