Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I was trying to display some data from table columns containing Chinese characters, encoded in UTF8, but got some unknown characters instead. I have tried to do CONVERT in SQL and also ApplyCodePage but still displaying some unknown characters. I also tried to display it in byte code which gets System.byte[]. Is there any way to display the data without rebuilding the entire database?
Ok I solved this myself. I find out it's because I store the chinese characters as VARCHAR which causes the error. I have to turn it to byte first then turn it to NVARCHAR, which is the only type that handles UTF8 and can be properly shown in the dashboard.
UTL_RAW.CAST_TO_NVARCHAR2(UTL_RAW.CAST_TO_RAW(<column>))
Ok I solved this myself. I find out it's because I store the chinese characters as VARCHAR which causes the error. I have to turn it to byte first then turn it to NVARCHAR, which is the only type that handles UTF8 and can be properly shown in the dashboard.
UTL_RAW.CAST_TO_NVARCHAR2(UTL_RAW.CAST_TO_RAW(<column>))