4

After upgrading from Postgres 9.1.2 to Postgres 9.4beta1, OTRS 3.3.5 stopped working with a Perl error found in http-error.log, raised when closing a ticket. The error is:

Wide character in subroutine entry at [...]/Kernel/System.DB.pm line 499

The line 499 is the following:

if ( !$Self->{dbh}->do( $Param{SQL}, undef, @Array ) ) {

It seems that the Perl script fails while executing a query.

My Perl version is v5.16.3.

I searched a lot but no solution worked for me so far.

Marcello
  • 879
  • 6
  • 20

1 Answers1

1

This is a warning not an error. Looking in perldiag gives us the explanation.

Wide character in %s

(S utf8) Perl met a wide character (>255) when it wasn't expecting one. This warning is by default on for I/O (like print). The easiest way to quiet this warning is simply to add the :utf8 layer to the output, e.g. binmode STDOUT, ':utf8' . Another way to turn off the warning is to add no warnings 'utf8'; but that is often closer to cheating. In general, you are supposed to explicitly mark the filehandle with an encoding, see open and binmode.

You have utf8-encoded characters where Perl is expecting to see bytes. You probably need to encode() your data before it gets to this point.

Dave Cross
  • 68,119
  • 3
  • 51
  • 97
  • 1
    Actually the script stops and the web server gives an error page (in the errorlog I see "the script terminated unexpectedly"). – Marcello Dec 16 '14 at 12:23