nikosv has asked for the wisdom of the Perl Monks concerning the following question:

I've got the same CGI script running on two separate servers.

Server A specs are :
Centos 6.5
Apache/2.2.15 (Unix)
perl5 (revision 5 version 10 subversion 1)
SOAP::Lite 1.27

Server B specs are :
Centos 5.6
Apache/2.2.3
perl5 (revision 5 version 8 subversion 8)
SOAP::Lite 0.714

The CGI script is a very simple test.cgi :
#!/usr/bin/perl

use SOAP::Transport::HTTP;

SOAP::Transport::HTTP::CGI->dispatch_to('test')->handle( );

package test;

sub select {


my $class = shift;
my $a1 	= shift;
my $a2 	= shift;
my $a3	= shift;
my $a4  = shift;
my $a5 	= shift;
my $a6	= shift;
my $a7	= shift;
my $a8	= shift;
my $a9  = shift;
my $a10	= shift;
my $a11	= shift;
my $a12	= shift;
my $a13 = shift;
my $a14 = shift;
my $a15	= shift;

 return [$a1.$a2];

}


the client calling the script is :
use SOAP::Lite +trace;

my $soap = SOAP::Lite->uri("http://192.168.1.262/test")->
proxy("http://192.168.1.262/cgi-bin/test.cgi")->
select("16/09/2019 17:04:00","16/09/2019","13/09/2019 13:44:09","Α","B",1,"s","e","g","x","x","748",3519999,4015,2)->result;

print "\n";
print "result is ", @{$soap};

Note that parameter "A" is in Greek the rest are in English.Both servers have as locale LANG=el_GR.ISO8859-7

When the client calls the script on Server A, all the parameters consumed by test.cgi have the UTF8 flag on,except Greek "A".(Dumped with Devel::Peek)
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "16/09/2019 17:04:00"\0 UTF8 "16/09/2019 17:04:00"
  CUR = 19
  LEN = 24
$VAR1 = \'16/09/2019 17:04:00';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "16/09/2019"\0 UTF8 "16/09/2019"
  CUR = 10
  LEN = 24
$VAR1 = \'16/09/2019';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "13/09/2019 13:44:09"\0 UTF8 "13/09/2019 13:44:09"
  CUR = 19
  LEN = 24
$VAR1 = \'13/09/2019 13:44:09';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x1f3cef0 "\301"\0
  CUR = 1
  LEN = 24
$VAR1 = \'Α';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "B"\0 UTF8 "B"
  CUR = 1
  LEN = 24
$VAR1 = \'B';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "1"\0 UTF8 "1"
  CUR = 1
  LEN = 24
$VAR1 = \'1';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "s"\0 UTF8 "s"
  CUR = 1
  LEN = 24
$VAR1 = \'s';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "e"\0 UTF8 "e"
  CUR = 1
  LEN = 24
$VAR1 = \'e';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "g"\0 UTF8 "g"
  CUR = 1
  LEN = 24
$VAR1 = \'g';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "x"\0 UTF8 "x"
  CUR = 1
  LEN = 24
$VAR1 = \'x';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "x"\0 UTF8 "x"
  CUR = 1
  LEN = 24
$VAR1 = \'x';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "748"\0 UTF8 "748"
  CUR = 3
  LEN = 24
$VAR1 = \'748';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "3519999"\0 UTF8 "3519999"
  CUR = 7
  LEN = 24
$VAR1 = \'3519999';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "4015"\0 UTF8 "4015"
  CUR = 4
  LEN = 24
$VAR1 = \'4015';
SV = PV(0x1f243c8) at 0x1b37880
  REFCNT = 1
  FLAGS = (POK,pPOK,UTF8)
  PV = 0x1f3cef0 "2"\0 UTF8 "2"
  CUR = 1
  LEN = 24
$VAR1 = \'2';
On the contrary when the client calls the script on Server B, all the parameters consumed by test.cgi have the UTF8 flag OFF,including Greek "A"
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "16/09/2019 17:04:00"\0
  CUR = 19
  LEN = 24
$VAR1 = \'16/09/2019 17:04:00';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "16/09/2019"\0
  CUR = 10
  LEN = 24
$VAR1 = \'16/09/2019';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "13/09/2019 13:44:09"\0
  CUR = 19
  LEN = 24
$VAR1 = \'13/09/2019 13:44:09';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "\301"\0
  CUR = 1
  LEN = 24
$VAR1 = \'Α';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "B"\0
  CUR = 1
  LEN = 24
$VAR1 = \'B';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "1"\0
  CUR = 1
  LEN = 24
$VAR1 = \'1';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "s"\0
  CUR = 1
  LEN = 24
$VAR1 = \'s';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "e"\0
  CUR = 1
  LEN = 24
$VAR1 = \'e';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "g"\0
  CUR = 1
  LEN = 24
$VAR1 = \'g';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "x"\0
  CUR = 1
  LEN = 24
$VAR1 = \'x';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "x"\0
  CUR = 1
  LEN = 24
$VAR1 = \'x';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "748"\0
  CUR = 3
  LEN = 24
$VAR1 = \'748';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "3519999"\0
  CUR = 7
  LEN = 24
$VAR1 = \'3519999';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "4015"\0
  CUR = 4
  LEN = 24
$VAR1 = \'4015';
SV = PV(0x12399a50) at 0x12036080
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x123a07e0 "2"\0
  CUR = 1
  LEN = 24
$VAR1 = \'2';

I have tried several scenarios and tests and can't find out why this is happening. Maybe some change in Perl/SOAP::Lite ?

Replies are listed 'Best First'.
Re: SOAP::Lite encoding mess?
by jcb (Parson) on Oct 18, 2019 at 22:44 UTC

    What are the HTTP headers and message sent by the client? Is it correctly indicating ISO-8859-7 encoding in HTTP and/or XML?

Re: SOAP::Lite encoding mess?
by Anonymous Monk on Oct 19, 2019 at 08:56 UTC

    Hi

    so which do you want?

    hmmm

    SOAP::Lite 0.714 AUG 18, 2011

    SOAP::Lite 1.27 MAY 14, 2018

    waste of time diagnosing version differences when its trivial to match versions