get Unicode value [PostgreSQL]
If you see this link
Its all about unicode code range
example :
U+0644 ل d9 84 ARABIC LETTER LAM
In PostgreSQL i开发者_StackOverflowts easy to get hex value :
select encode('ل','hex')
it will return the hex value, d9 84.
but how to get the unicode code point ?
Thanks
If your input string is in UTF-8, you can use the ascii function:
ascii(string) int
ASCII code of the first character of the argument. For UTF8 returns the Unicode code point of the character. For other multibyte encodings. the argument must be a strictly ASCII character.
精彩评论