Subject: | UTF-8 input |
Date: | Tue, 22 Jan 2008 00:16:23 -0800 |
To: | bug-www-facebook-api [...] rt.cpan.org |
From: | Ryan D Johnson <ryan [...] innerfence.com> |
Hi, David.
Looks like things need to get run through Encode::encode_utf8 before
processing (md5_hex fails hard, then facebook blows up). Simply running
the input values through encode_utf8 makes everything work swimmingly.
The specific API I'm using is photos->upload, and the caption field is
where I'm hitting the issue.
But it seems to me that it wouldn't harm the params to run them all
through this, right? Perl strings are utf-8 internally, and all strings
have a utf-8 representation, so this just converts them to octets that
the lower-level processing is all happy with.
Let me know if you need any more info. I was able to work around this by
manually encoding my the specific field I was having trouble with. Seems
like it would be simple to add this to maybe
WWW::Facebook::API::_format_and_check_params.
Thanks for writing this really useful module!
/rdj