perl – Postgres 9.4beta1中otrs中子例程条目中的宽字符

前端之家收集整理的这篇文章主要介绍了perl – Postgres 9.4beta1中otrs中子例程条目中的宽字符前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
从Postgres 9.1.2升级到Postgres 9.4beta1后,OTRS 3.3.5停止使用http-error.log中发现的Perl错误,在关闭票证时引发.错误是:

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

499行如下:

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

似乎Perl脚本在执行查询时失败.

我的Perl版本是v5.16.3.

搜索了很多但到目前为止还没有解决方案.

解决方法

这是一个警告而不是错误.查看 perldiag给出了解释.

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.

你有utf8编码的字符,其中Perl期望看到字节.您可能需要在数据到达此点之前对其进行编码().

猜你在找的Perl相关文章