2014-06-17 Hirofumi Kosaka <kosaka@rworks.jp>
* lib/PandoraFMS/PluginServer.pm: Fixed to handle plugin's output that includes multibyte character string. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10207 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
62c92e4b9f
commit
e8f76f8e9d
|
@ -1,3 +1,8 @@
|
|||
2014-06-17 Hirofumi Kosaka <kosaka@rworks.jp>
|
||||
|
||||
* lib/PandoraFMS/PluginServer.pm: Fixed to handle plugin's
|
||||
output that includes multibyte character string.
|
||||
|
||||
2014-05-15 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* util/pandora_manage.pl: Fixed typo.
|
||||
|
|
|
@ -27,7 +27,7 @@ use Thread::Semaphore;
|
|||
use POSIX qw(strftime);
|
||||
use HTML::Entities;
|
||||
use JSON qw(decode_json);
|
||||
use Encode qw(encode_utf8);
|
||||
use Encode qw(encode_utf8 decode_utf8);
|
||||
|
||||
# Default lib dir for RPM and DEB packages
|
||||
use lib '/usr/lib/perl5';
|
||||
|
@ -232,10 +232,8 @@ sub data_consumer ($$) {
|
|||
$module_data = `$command`;
|
||||
};
|
||||
|
||||
# Empty ?
|
||||
if (!defined($module_data)){
|
||||
$module_data = "";
|
||||
}
|
||||
# Empty ? or handle it as 'utf8' string
|
||||
$module_data = ( !defined($module_data) ? "" : decode_utf8($module_data) );
|
||||
|
||||
# Clean blank spaces and carriage return from start and end of the data
|
||||
$module_data =~ s/^[\s|\n|\r]*//;
|
||||
|
|
Loading…
Reference in New Issue