Skip Menu |
 

This queue is for tickets about the Net-Twitter-Lite CPAN distribution.

Report information
The Basics
Id: 87672
Status: open
Priority: 0/
Queue: Net-Twitter-Lite

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Warnings when using non-ASCII characters
Download (untitled) / with headers
text/plain 664b
With the following script: use Net::Twitter::Lite::WithAPIv1_1; my $nt = Net::Twitter::Lite::WithAPIv1_1->new(...); my $aeoeue = "\344\366\374"; # äöü my $r = $nt->search($aeoeue); I get the following warning: Net::OAuth warning: your OAuth message appears to contain some multi-byte characters that need to be decoded via Encode.pm or a PerlIO layer first. This may result in an incorrect signature. at /opt/perl-5.14.2/lib/site_perl/5.14.2/Net/OAuth/Message.pm line 106. The warning does not happen if only ASCII characters are used, or if the string has internally the utf8 flag set (e.g. if utf8::upgrade is called on the string). Regards, Slaven
Subject: Re: [rt.cpan.org #87672] Warnings when using non-ASCII characters
Date: Wed, 7 Aug 2013 07:40:29 -0700
To: bug-Net-Twitter-Lite [...] rt.cpan.org
From: Marc Mims <marc [...] questright.com>
Download (untitled) / with headers
text/plain 1.3k
Net::Twitter::Lite expects decoded strings, not byte strings. So, decode your strings on input, or use utf8::upgrade as appropriate before passing the string to Net::Twitter::Lite's API methods. On Wed, Aug 7, 2013 at 6:09 AM, Slaven_Rezic via RT < bug-Net-Twitter-Lite@rt.cpan.org> wrote: Show quoted text
> Wed Aug 07 09:09:40 2013: Request 87672 was acted upon. > Transaction: Ticket created by SREZIC > Queue: Net-Twitter-Lite > Subject: Warnings when using non-ASCII characters > Broken in: 0.12004 > Severity: (no value) > Owner: Nobody > Requestors: SREZIC@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=87672 > > > > With the following script: > > use Net::Twitter::Lite::WithAPIv1_1; > my $nt = Net::Twitter::Lite::WithAPIv1_1->new(...); > my $aeoeue = "\344\366\374"; # äöü > my $r = $nt->search($aeoeue); > > I get the following warning: > > Net::OAuth warning: your OAuth message appears to contain some multi-byte > characters that need to be decoded via Encode.pm or a PerlIO layer first. > This may result in an incorrect signature. at > /opt/perl-5.14.2/lib/site_perl/5.14.2/Net/OAuth/Message.pm line 106. > > The warning does not happen if only ASCII characters are used, or if the > string has internally the utf8 flag set (e.g. if utf8::upgrade is called on > the string). > > Regards, > Slaven > >
Download (untitled) / with headers
text/plain 1.6k
On 2013-08-07 10:40:47, marc@questright.com wrote: Show quoted text
> Net::Twitter::Lite expects decoded strings, not byte strings. So, > decode > your strings on input, or use utf8::upgrade as appropriate before > passing > the string to Net::Twitter::Lite's API methods. >
No, this is not correct approach in perl. A perl application has to behave the same for codepoints 128..255 regardless if the utf8 flag is set or not. Show quoted text
> > On Wed, Aug 7, 2013 at 6:09 AM, Slaven_Rezic via RT < > bug-Net-Twitter-Lite@rt.cpan.org> wrote: >
> > Wed Aug 07 09:09:40 2013: Request 87672 was acted upon. > > Transaction: Ticket created by SREZIC > > Queue: Net-Twitter-Lite > > Subject: Warnings when using non-ASCII characters > > Broken in: 0.12004 > > Severity: (no value) > > Owner: Nobody > > Requestors: SREZIC@cpan.org > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=87672 > > > > > > > With the following script: > > > > use Net::Twitter::Lite::WithAPIv1_1; > > my $nt = Net::Twitter::Lite::WithAPIv1_1->new(...); > > my $aeoeue = "\344\366\374"; # äöü > > my $r = $nt->search($aeoeue); > > > > I get the following warning: > > > > Net::OAuth warning: your OAuth message appears to contain some multi- > > byte > > characters that need to be decoded via Encode.pm or a PerlIO layer > > first. > > This may result in an incorrect signature. at > > /opt/perl-5.14.2/lib/site_perl/5.14.2/Net/OAuth/Message.pm line 106. > > > > The warning does not happen if only ASCII characters are used, or if > > the > > string has internally the utf8 flag set (e.g. if utf8::upgrade is > > called on > > the string). > > > > Regards, > > Slaven > > > >
Subject: Re: [rt.cpan.org #87672] Warnings when using non-ASCII characters
Date: Wed, 7 Aug 2013 10:43:33 -0700
To: bug-Net-Twitter-Lite [...] rt.cpan.org
From: Marc Mims <marc [...] questright.com>
Download (untitled) / with headers
text/plain 325b
On Wed, Aug 7, 2013 at 8:02 AM, Slaven_Rezic via RT <bug-Net-Twitter-Lite@rt.cpan.org> wrote: Show quoted text
> > No, this is not correct approach in perl. A perl application has to behave the same for codepoints 128..255 regardless if the utf8 flag is set or not.
Would this then be a Net::OAuth bug, rather than a Net::Twitter::Lite bug?
CC: SREZIC [...] cpan.org
Subject: Re: [rt.cpan.org #87672] Warnings when using non-ASCII characters
Date: Thu, 08 Aug 2013 11:53:12 +0200
To: bug-Net-Twitter-Lite [...] rt.cpan.org
From: Slaven Rezic <slaven [...] rezic.de>
Download (untitled) / with headers
text/plain 811b
"marc@questright.com via RT" <bug-Net-Twitter-Lite@rt.cpan.org> writes: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87672 > > > On Wed, Aug 7, 2013 at 8:02 AM, Slaven_Rezic via RT > <bug-Net-Twitter-Lite@rt.cpan.org> wrote:
>> >> No, this is not correct approach in perl. A perl application has to behave the same for codepoints 128..255 regardless if the utf8 flag is set or not.
> > Would this then be a Net::OAuth bug, rather than a Net::Twitter::Lite bug? >
Sorry, without looking at the source code and documentation of both modules I cannot tell. Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de BBBike - route planner for cyclists in Berlin WWW version: http://www.bbbike.de Perl/Tk version for Unix and Windows: http://bbbike.sourceforge.net


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.