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!

Convert String to Hexadecimal...

938413May 19 2012 — edited May 20 2012
We would like to convert a String (Arabic / English) characters into Hexadecimal code points.

e.g.

رقم المرجع

0631 0642 0645 0020 0627 0644 0645 0631 062C 0639

http://www.rishida.net/tools/conversion/

I found similar function in C# to convert, can we have anything similar in Oracle :


public static string StrToHex(string input)
{
StringBuilder s = new StringBuilder();
foreach (char chr in input)
{
s.Append(Convert.ToString(chr, 16).PadLeft(4,'0'));
}
return s.ToString();
}

Please we need help on this...
This post has been answered by chris227 on May 19 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2012
Added on May 19 2012
6 comments
6,060 views