postgresql - UTF16 hex to text -


I have a UTF-16 hex representation, such as "0633064406270645" in Arabic is "سلام".

I would like to convert it to my text equivalent, is there a direct way to do this in postgrasqual?

I can change the UTF code point as follows; Unfortunately it seems that UTF16 is not supported. Any ideas on how to do this in PostgreSQL, the worst case scenario I would write a function?

  Select Convert_frame (Decoded (E'D8B3D984D8A7D985 ',' HEX '),' UTF8 '); Select "سلام" Convert_frame (decode (E'0633064406270645 ',' hex '),' UTF16 '); Error: Invalid source encoding name "UTF16" ********** Error ****************************************************************************************** ********************************************* Post-Text "MadProp =" Text "> 

That's right, Postgreat does not support UTF-16. / P>

However, it supports:

  SELECT U & amp;; 0633 \ 0644 \ 0627 \ 0645 \ ' 

but Keep in mind that Unicode Code Issues and UTF-16 Code Entities are equal in only. In other words, if you have any UTF-16 characters that are more than 16- Bit If you spread the code units, you will have to translate them into this code.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -