Before read below - CaminteJS you have no support of charset property.
Hi! I change utf8 to utf8mb4 my mysql database and all working well on PHP but when I try to insert the same values using CaminteJS & mysql it fails with message:
app:log Error: ER_INVALID_CHARACTER_STRING: Invalid utf8 character string: '\xF0\x9F\x9B\x8D'
app:log at Query.Sequence._packetToError (/service/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14)
app:log at Query.ErrorPacket (/service/app/node_modules/mysql/lib/protocol/sequences/Query.js:77:18)
app:log at Protocol._parsePacket (/service/app/node_modules/mysql/lib/protocol/Protocol.js:279:23)
app:log at Parser.write (/service/app/node_modules/mysql/lib/protocol/Parser.js:76:12)
app:log at Protocol.write (/service/app/node_modules/mysql/lib/protocol/Protocol.js:39:16)
app:log at Socket.<anonymous> (/service/app/node_modules/mysql/lib/Connection.js:103:28)
Before read below - CaminteJS you have no support of charset property.
Hi! I change utf8 to utf8mb4 my mysql database and all working well on PHP but when I try to insert the same values using CaminteJS & mysql it fails with message:
My connection code:
Maybe can I do
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
and it will resolve my issue, but how can I do it or there is some other trick to do that?Thanks a lot for any help, I spent 1 week to resolve this)