Skip Menu |

This queue is for tickets about the SMS-MessageBird CPAN distribution.

Report information
The Basics
Id: 127966
Status: new
Priority: 0/
Queue: SMS-MessageBird

Owner: Nobody in particular
Requestors: kparkhurst [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Unicode Support Bug (SMS::MessageBird 0.03)
Date: Sat, 8 Dec 2018 02:00:35 -0800
To: bug-SMS-MessageBird [...]
From: Kaitlyn Parkhurst <kparkhurst [...]>
Hello, I'm using SMS::MessageBird and have run into an issue with sending messages with unicode. I attempted to send the following message: "I am unicode šŸ˜ !" 107 my $res = $sms->sms->send( 108 recipients => $message->phone_number, 109 body => "I am unicode šŸ˜ !", 110 originator => $origin_number->phone_number, 111 datacoding => ( $type eq 'gsm' ? 'plain' : 'unicode' ), 112 ); I got the following error: HTTP::Message content must be bytes at /usr/share/perl5/vendor_perl/HTTP/Request/ line 94. After some digging, I made the following patch for SMS/MessageBird/ and it seems to have corrected the issue: 7a8 Show quoted text
> use Encode qw( encode_utf8 );
147,148c148,149 < $request_params{'Content-Type'} = 'application/json', < $request_params{Content} = $content_payload; --- Show quoted text
> $request_params{'Content-Type'} =
'application/json;charset=utf-8', Show quoted text
> $request_params{Content} = encode_utf8($content_payload);
Thank you for your work on SMS::MessageBird, it's been wonderful to use.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to