We are getting Illegal character (?) while retrieving a nvarchar field(TEMP-WRK-INFO) from a table in a cobol module.
Below are region details:-
Linux version - RHEL 8.3
MSSQL version - 2019
Initially, we got illegal character while converting the hex value to ASCII value. For example, when the amount of 894.55 is moved to TEMP-WRK-INFO, then hex value of (89 45 5C) is converted to ASCII as (?E\). This issue occurred as extended ASCII value is not converted correctly.
We had a fix for this issue by changing the LANG to en_US.CP1252 in environment settings, then it worked for all extended ASCII value except for 81 and 90. When the hex value has the combination of 81 or 90, then we get the illegal characters. Same logic is working fine in windows environment.