Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Handling UTF8 characters in APEX

Niki DilipSep 20 2022

I have created a textarea pageitem. In the textarea, I am pasting a sql query or writing a simple text with space and linebreak . On submit, in the next page , the same needs to be displayed.
As my sql query or the inputted text was getting displayed in same line without linebreak, I used the below code. Which solved the problem.
:P2_NEW := replace(replace(:P2_NEW,CHR(32),' '),chr(10),'<br>');
htp.p(P2_NEW);
But now when i copy the sql and try to run in sql developer, the sql doesnt run, On pasting the sql in notepad ++ and selecting encoding->UTF8, i am seeing that whereever there is space, it is getting replaced as 'xA0' characters Similarly for text which contained ü is replaced by 'xFC'.
What needs to be done so that, the space doesnot get replaced by xA0 and ü by xFC(Please note there are many similar characters that gets replaced with the corresponding UTF8 characters.eg ä)
Please advice.
Thanks & Regards

Comments

Post Details

Added on Sep 20 2022
0 comments
329 views