Skip to Main Content

SQL & PL/SQL

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!

How to convert unicode characters to html entities

d862f7ec-d0bd-4030-947a-358e84bd9256Jun 3 2015 — edited Jun 5 2015

Hello,

I need to convert unicode characters in my data to html entities in order to present them as html content. Currently, I do these replacements manually for the characters that I know I will probably have, e.g.:

l_text := replace(replace(replace(replace(replace(replace(l_text, chr(U+197), 'Å'),  chr(U+196), 'Ä'),   chr(U+195), 'Ã'), chr(U+194), 'Â'),  chr(U+193), 'Á'), chr(U+192), 'À');

Is there a way to do the replacements all together using an oracle function? (...hoping for a better performance as well...)

I saw that there was already an old discussion about this since 2009 but without an answer How to convert to HTML entities?

and I hope that now (6 years later) maybe there is a solution :-)

Does anyone have an idea?

Thanks a lot in advance!

Regards,

A.L.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2015
Added on Jun 3 2015
12 comments
8,907 views