Skip Menu |

This queue is for tickets about the CPAN-Changes CPAN distribution.

Report information
The Basics
Id: 88036
Status: open
Priority: 0/
Queue: CPAN-Changes

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

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



Subject: No UTF8 Support obvious

The Spec and the code itself seem to be reasonably ignorant of UTF8 issues.

I just discovered this in the process of munging my own CPAN::Changes files, as an extension I have in progress ( CPAN::Changes::Markdown ) was sensitive to specific things in The Changes file.

Specifically, in my changes file, I regularly use 0xA0 ( Non-breaking space character ) and → ( 0x2192 ), which if not read in utf8 mode, become a chatoic mess of bytes that don't match regular expressions , like you're matching vs "\xC2\xA0\xE2\x86\x92\xC2\xA0" instead of " → "

The easiest approach here is to either have a load_utf8 method, or a load_filehandle() method that takes a Path::Tiny::path('foo')->openr_utf8  or something.

Alternatively, you could try to have unicode by default, but not sure how good an idea that is.

 

Le 2013-08-22 21:33:12, KENTNL a écrit : Show quoted text
> The Spec and the code itself seem to be reasonably ignorant of UTF8 > issues.
The problem is more general: the spec does not specify encoding at all. And we are not leaving in a pure ASCII world. -- Olivier Mengué - http://perlresume.org/DOLMEN
Le 2013-09-09 14:30:53, DOLMEN a écrit : Show quoted text
> Le 2013-08-22 21:33:12, KENTNL a écrit :
> > The Spec and the code itself seem to be reasonably ignorant of UTF8 > > issues.
> > The problem is more general: the spec does not specify encoding at > all. And we are not leaving in a pure ASCII world.
Just opened ticket 88540 for encoding support. -- Olivier Mengué - http://perlresume.org/DOLMEN
The next release will attempt to decode either UTF-8 or Latin-1 when using the ->load method. The ->load_string method will continue to accept decoded strings. I'd like to include this in the spec in the future.