Hi Experts,
We have to export a report from an Oracle database which has some fields turned into binary. The logic for these fields is as stated by the client: value -> convert to hexadecimal -> convert to binary.
The formula we arrived at seems to be working fine:
UTL_RAW.CAST_TO_VARCHAR2(TRIM(TO_CHAR(P_VAL,
'XXXXXXXXXXXXXXX')))
I have noticed that the value for 0152 returned by this formula is the sign ˜. This is presented in PL/SQL correctly when running a simple select query. This is also present in the customer original file, but the output file we are generating shows us this symbol: �
I am using Notepad++ plus a Hex plugin to see these files. When looking at the correct file with the hex mode, I see the hex value set to 00 98. But our output file is having so different values as we test different things, none giving us the expected ˜ or 00 98 (hex value).
What could we be doing wrong? Any ideas? Database is version 11.2
Thanks in advance.
Rafa