Skip Menu |

This queue is for tickets about the WebService-Solr CPAN distribution.

Report information
The Basics
Id: 89288
Status: resolved
Priority: 0/
Queue: WebService-Solr

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

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



Subject: UTF8 Encoding issue - wide character errors in IO::Handle when Template Toolkit Renders.
I'm using webservice::solr as a catalyst model (extending catalyst::model rather than using the dedicated adapter). catalyst is 5.90042. OS is mint 15 (ubuntu 13.04) x64. solr instance is 4.4 and the data comes from postgres, both the collection and source data are configured as utf8. I have a long text field in my solr database, which when rendered by the view results in the following error and no data returned to the client browser. [error] Caught exception in engine "Wide character in syswrite at /usr/lib/perl/5.14/IO/Handle.pm line 216, <DATA> line 1003." I'm attaching a text file giving an example of the raw text. As a workaround I wrote a macro in template toolkit: [% MACRO utfclean(field) PERL %] use utf8; my $field = $stash->get('field'); utf8::encode($field); print $field ; [% END %] [% utfclean( doc.value_for('description') ) %]
Subject: example.wsr.txt
Original entry (explodes) This program showcases Piffaro's legendary instrumentarium and versatile musicians, in music from French, Flemish and English composers from the late 15th through the mid 16th centuries. The winner of Piffaro’s 2013 recorder competition, Martin Bernstein, joins the ensemble, blending his recorder sound with the group, and thrilling all with his virtuosity and fine musicianship. Entity version is OK This program showcases Piffaro&#39;s legendary instrumentarium and versatile musicians, in music from French, Flemish and English composers from the late 15th through the mid 16th centuries. The winner of Piffaro&rsquo;s 2013 recorder competition, Martin Bernstein, joins the ensemble, blending his recorder sound with the group, and thrilling all with his virtuosity and fine musicianship.
This issue is fixed by Catalyst 5.90051. The fix requires setting the new encoding variable globally for your catalyst application (does not work with setting c$->config within the Controller that will invoke renderview). __PACKAGE__->config( { encoding => 'utf8', }, );