Skip Menu |

This queue is for tickets about the XML-RSS CPAN distribution.

Report information
The Basics
Id: 15332
Status: resolved
Priority: 0/
Queue: XML-RSS

People
Owner: Nobody in particular
Requestors: hunterx11 [...] gmail.com
Cc:
AdminCc:

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



Subject: Error with some Unicode characters
When saving an RSS object containing certain Unicode characters (em dash 2014 is one example), Perl outputs the warning "Wide character in print at /Library/Perl/5.8.6/XML/RSS.pm line 1615." and incorrectly prints said character. In the case of em dash, it prints — instead of —. The RSS object in question uses RSS version 1.0 and the UTF-8 encoding. I have not encountered this problem with most Unicode characters--Japanese characters for example work fine. I am using Mac OS X 10.4.2 with Perl 5.8.6, XML::Parser 2.34, and XML::RSS 1.05.
I believe I have found the problem on line 1614 of RSS.pm: open(OUT,">$file") || croak "Cannot open file $file for write: $!"; Perhaps this could be changed to open(OUT,">:".$self->{encoding}, $file) || croak "Cannot open file $file for write: $!"; or something with the same effect of specifying the encoding of the filehandle.
On Wed Nov 16 18:11:14 2005, guest wrote: Show quoted text
> I believe I have found the problem on line 1614 of RSS.pm: > open(OUT,">$file") || croak "Cannot open file $file for write: $!"; > Perhaps this could be changed to > open(OUT,">:".$self->{encoding}, $file) || croak "Cannot open file > $file for write: $!"; > or something with the same effect of specifying the encoding of the > filehandle.
Hi Ask! (and all). This bug was already solved in the subversion: <<<<<<< sub save { my ($self,$file) = @_; open(OUT, ">:encoding($self->{encoding})", "$file") or croak "Cannot open file $file for write: $!"; print OUT $self->as_string; close OUT; } Show quoted text
>>>>>>>
I suggest to close it. Regards, Shlomi Fish
This was fixed a few releases ago.