[Opensrf-commits] r2211 - in branches/rel_1_6/src/perl/lib/OpenSRF: . Transport/SlimJabber (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 17 22:44:56 EDT 2011
Author: gmc
Date: 2011-03-17 22:44:54 -0400 (Thu, 17 Mar 2011)
New Revision: 2211
Modified:
branches/rel_1_6/src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm
branches/rel_1_6/src/perl/lib/OpenSRF/UnixServer.pm
Log:
specify use of the utf8 I/O layer
Solves problem where invoking a method via osrf_http_translator
resulted in an exception thrown by FreezeThaw if any of the characters
in the message are non-ASCII *and* not in the Latin-1 character
set. Oddly, if Evergreen been originally developed in Georgia the
country, not Georgia the state, the bug would have been apparent much earlier.
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Modified: branches/rel_1_6/src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm
===================================================================
--- branches/rel_1_6/src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm 2011-03-13 06:04:51 UTC (rev 2210)
+++ branches/rel_1_6/src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm 2011-03-18 02:44:54 UTC (rev 2211)
@@ -157,6 +157,7 @@
# keep trying to deliver the message until we succeed
my $socket = IO::Socket::UNIX->new( Peer => $sock );
+ binmode $socket, ':utf8';
unless($socket and $socket->connected) {
$logger->error("$app inbound: unable to connect to inbound socket $sock: $!");
Modified: branches/rel_1_6/src/perl/lib/OpenSRF/UnixServer.pm
===================================================================
--- branches/rel_1_6/src/perl/lib/OpenSRF/UnixServer.pm 2011-03-13 06:04:51 UTC (rev 2210)
+++ branches/rel_1_6/src/perl/lib/OpenSRF/UnixServer.pm 2011-03-18 02:44:54 UTC (rev 2211)
@@ -67,6 +67,7 @@
my $self = shift;
my $data; my $d;
+ binmode STDIN, ':utf8';
while( $d = <STDIN> ) { $data .= $d; }
my $orig = $0;
More information about the opensrf-commits
mailing list