I am working with Postgres and newbie too,
I have to store the user's comment (like facebook comment) into database. probably I will use column type "text" to store the comment.
If in case the comment is mixed up with emojis (unicode), the text type is enough or I should use any other column type?
emoji is a pure SQL PostgreSQL extension to encode/decode bytea/text to/from emoji. A lookup-table is constructed from the first 1024 emojis from [https://unicode.org/Public/emoji/13.1/emoji-test.txt], where each emoji maps to a unique 10 bit sequence.
Emojis look like images, or icons, but they are not. They are letters (characters) from the UTF-8 (Unicode) character set.
Use urlEncoder to encode your String having emoticons. Store it in DB without altering the MysqlDB. You can store it in solr core(decoded form)if you want or you can store encoded form.
The Unicode Standard has assigned numbers to represent emojis. Here's how it works. In the Unicode Standard, each emoji is represented as a "code point" (a hexadecimal number) that looks like U+1F063, for example.
The TEXT "character" type should be fine as UTF-8, generally, is a supported character set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With