Search code examples
oracle-databaseunicodeutf-8type-conversionoracle12c

Convert Unicode characters to UTF8 (decimal) in Oracle SQL 12c - not working with Convert function


I have a case when I have to change Oracle connectors from 11g to 12c and below query is not working anymore: select getunicodetransl(column) from table. In 11g it worked without error, but in 12c version it gives error "ORA-00904: "GETUNICODETRANSL": invalid identifier".

How can I replace this function, so I can have the same results? For example this function converts value "!$9LQND6" to "33369LQND6", this means it replaced ! with value 33 and $ with value 36, the UTF8 equivalent.

I've tried multiple ways of replacing this function, but I couldn't get the same result. The most correct option from my point of view was "select convert(column,'utf8') from table", but the result is still "!$9LQND6".

Thank you!


Solution

  • There is no such function in Oracle. Someone created that function in your 11g database. Get the code and deploy it in your 12c