pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.47k stars 2.18k forks source link

POCO mysql get emoji from database, return always ??? #3496

Open amrkamal2025 opened 2 years ago

amrkamal2025 commented 2 years ago

Hi, I use POCO MYSQL to select a column from the database contains emoji, mainly I was having an issue getting them but solved after changing the charset from UTF-8 to UTF8mb4 on the MYSQL server and also in my connection string, this is working good on PHP, Python, Java, but when I tried to get the String using POCO is always return wrong values and a lot of ??? marks examples of correct output:

piango😭
🤟🤟🤟
❤️❤️❤️
😍😍toppp
bravo💕
🙏🙏🙏
🥰🥰

what it really give me when I use charset = utf8mb4

piango?
???
??????
??toppp
bravo?
???
??

the string I use to connect host=xxxx;user=xxxxx;password=xxxxx;db=SocialMoney;compress=true;auto-reconnect=true;character-set=utf8mb4 when I use utf8 or default instead of utf8mb I got better result a little bit but still not the result I expected example of it

piango?
???
❤️❤️❤️
??toppp
bravo?
???
??

so did I miss something in my codes or any conversion needed? or it's an issue?

Thanks in advance.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 60 days since being marked as stale.