Jump to content

Save text with Emojis from UnimEdit to a database


likemike

Recommended Posts

Hello!

Does anyone knows a way how to save Emojis, which are entered in an UnimEdit to database and to display them later f.ex. in an UnimMemo?

When I use an UnimEdit, you can insert Emojis on Smartphones. When I save the UnimEdit.Text in a database field and load it back to a memo field there are ???? displayed instead of the emojis. I figuered out, that the Emojis are represented by 2 hex values each. When saving it to a database field the hex pairs are replaced to ?-signs.

Regards

Mike

Link to comment
Share on other sites

  • likemike changed the title to Save text with Emojis from UnimEdit to a database

Yes - but that's for the whole database. I don't want Unicode for the whole db. I only need Unicode to store the Emojis. And that's in a single field. In Firebird you can define the character set for each field seperately, but as I said - it doesn't work.

So this is more a FireDAC problem, than a problem with UniGui.

Link to comment
Share on other sites

I've got the solution:
 

ALTER TABLE "T_Table" ALTER COLUMN TEXT_FIELD TYPE VARCHAR(8192) CHARACTER SET OCTETS COLLATE OCTETS

The “trick” is to use character set OCTETS. Because OCTETS is a special character set that blindly stores only what you poke into it—without transliteration—it is ideal for making the character codes neutral with respect to code page.

Link to comment
Share on other sites

1 minute ago, likemike said:

The “trick” is to use character set OCTETS. Because OCTETS is a special character set that blindly stores only what you poke into it—without transliteration—it is ideal for making the character codes neutral with respect to code page.

Okay. Very good.

Link to comment
Share on other sites

×
×
  • Create New...