May 2015 Archives

CPAN PR-Challenge: May Report

Somehow I missed to post my April report. Don't remember well what was the PR. It was something basic, as I lack the time for real work.

This month I prepared a Pull Request on removing HTML from result entries obtained with WWW::Wikipedia. Now, waiting to see if it gets merged. It seems I have no luck on my PRs to be merged...

Term::ReadLine::Gnu Unicode Hell

I must be doing something wrong. Surely. I have a REST service. I get data using HTTP::Tiny and use JSON::Tiny to decode it.

If I try to print to the Term::ReadLine::Gnu OUT filehandle, I get double encoded strings, like this:

    coração

If I try to binmode it to utf-8, things get worst, with triple encoded strings:

    coração

Resolved it decoding (Encode::decode) from UTF-8 and using the internal Perl character representation. It worked.

The problem was when I tried to feed a pre-defined input line to Term::Rea…

About Alberto Simões

user-pic I blog about Perl. D'uh!