|Subject:||RFH2 transcoding problem|
|Date:||Sat, 12 Mar 2016 01:18:15 +0100|
|To:||bug-MQSeries [...] rt.cpan.org|
|From:||Franck Davalo <franck.davalo [...] gmail.com>|
when creation a RFH2 message and sending it to a Queue, some numeric fields (namevalueccsid) are transcoded as string before the message is sent by example a B804 0000 value for 1208 will be converted to C2B8040000 because the B8 as a char is not an ascii value, so it is converted as a UTF-8 2 bytes char C2B8 this is due to the call to SvPV instead of SvPVbyte on the message content Buffer = SvPV(Msg,PL_na); MQPUT(Hconn,Hobj,&MsgDesc,&PutMsgOpts,SvCUR(Msg),Buffer,&CompCode,&Reason); if you replace SvPV by SvPVbyte, the problem is solved.