I am using Asciistr method in oracle which is supposed to convert given structure to ascii. Arabic characters are converted correctly but english are still the same while in some online converters I can see that numbers like 1 and 2 are converted to 0031 and 0032. Here is my method:
create or replace procedure replace_ascii(test_var in varchar2,valueRet out varchar2) is
select replace (asciistr(test_var), '\', null)
I am currently replacing numbers with their expected value in this way:
select replace(replace (valueRet,'1','0031'),'2','0032')
But I don't want to use 'replace' each time to return the correct value. What is the best way to convert those characters?
1 --> 0031
2 --> 0032
A --> 0041
Am I missing something here? PLease check this link http://r12a.github.io/apps/conversion/
and try convert english numbers and letters, and check the result of the last tag.
What I have tried:
I tried to use RAWTOHEX but some characters are missed like: 1 is converted to 31 intead of 0031, A is converted to 41 instead of 0041 .... and arabic characters are converted incorrectly.