I'm getting an 'Unconvertable character' exception when sending a HTTPRequestHeader to HTTPRequest Node containing a special character.
Error in the ExceptionList when debugging:
RecoverableException
File:CHARACTER:/jenkins/slot0/product-build/WMB/src/CommonServices/ImbConverter.cpp
Line:INTEGER:733
Function:CHARACTER:ImbConverterCPP::
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2136
Text:CHARACTER:Unconvertable character
Insert
Type:INTEGER:5
Text:CHARACTER:1920
Insert
Type:INTEGER:5
Text:CHARACTER:4c0061006c0069006100192073002000420075007200690061006c002000460075006e006400200061006e006400200043006100720065002000450078007000 ...data truncated to first 64 chars
Insert
Type:INTEGER:2
Text:CHARACTER:819
Snippet of my esql code:
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/octet-stream';
SET OutputRoot.HTTPRequestHeader."X-IntegrationServer-Resource-Name" = rInputDocData.*:DocumentName;
--Setting the content
SET OutputRoot.BLOB.BLOB = BASE64DECODE(rInputDocAttachment.*:AttachmentData64Binary);
The special character is coming in the field rInputDocData.*:DocumentName. Some of the values are:
Printing….PDF
Mark’s Agreement .pdf
Notice the … and ’ in the above two values which are not recognized as part of UTF-8.
Is there a way to convert these values to ISO 8859-1 in ESQL as doing the same conversion in Notepad++ leads to the values getting accepted?
I have tried the below steps but none have worked and I'm still getting the same error:
Setting OutputRoot.Properties.CodedCharSetId to 1208 and OutputRoot.Properties.Encoding to 546 as the properties were when the request was received in Input.
Setting OutputRoot.Properties.CodedCharSetId to 819.
Setting Content-Type HTTPRequestHeader to 'application/octet-stream; charset=utf-8'.
Setting Content-Type HTTPRequestHeader to 'application/octet-stream; charset=iso-8859-1'.
Casting the HTTPRequestHeader 'X-IntegrationServer-Resource-Name' in the below ways:
- SET OutputRoot.HTTPRequestHeader."X-IntegrationServer-Resource-Name" = CAST(rInputDocData.*:DocumentName AS CHARACTER CCSID 1208 ENCODING 546);
- SET OutputRoot.HTTPRequestHeader."X-IntegrationServer-Resource-Name" = CAST(rInputDocData.*:DocumentName AS CHARACTER CCSID 819);
- SET OutputRoot.HTTPRequestHeader."X-IntegrationServer-Resource-Name" = CAST(CAST(rInputDocData.*:DocumentName AS CHARACTER CCSID 1208 ENCODING 546) AS CHARACTER CCSID 819);
The source vendor have refused to handle/convert the special character so it is upon us to handle this in ACE. Any help would be much appreciated.