質問

I'm using codeigniter and trying to save 🚚 to a MYSQL database table

The error i'm getting is

Incorrect string value: '\xF0\x9F\x9A\x9A' for column 'post'
役に立ちましたか?

解決

1) Ensure you're using MYSQL 5.5 only then will you be able to change the collation to utf8mb4_something

2) Ensure table columns that are going to receive emoji have their collation set to utf8mb4_something

3) Edit your database.php config file

$db['default']['char_set'] = 'utf8mb4';
$db['default']['dbcollat'] = 'utf8mb4_unicode_ci';

他のヒント

according this link

http://webcache.googleusercontent.com/search?q=cache:http://andy-carter.com/blog/saving-emoticons-unicode-from-twitter-to-a-mysql-database

you can set your database char_set to utf8mb4 but all supported emojees are here:

✂️⤵️ ☺️☹️ ✊ ✌✋☝️ ✍❤️⛑ ⛹☘⭐️ ✨ ☄ ☀️ ⛅️ ☁️ ⛈ ⚡️ ❄️ ❄️ ☃ ⛄️ ☂ ☔️ ☕️ ⚽️ ⚾️ ⛳️ ⛷ ⛸ ⛹
✈️ ⛵️ ⛴ ⚓️ ⛽️ ⛲️ ⛰ ⛺️ ⛪️ ⛩ ⌚️ ⌨ ☎️ ⏱ ⏲ ⏰ ⏳ ⌛️ ⚖ ⚒ ⛏ ⚙ ⛓ ⚔ ☠ ⚰ ⚱ ⚗ ⛱ ✉️ ✂️ ✒️ ✏️ ❤️ ❣ ☮ ✝ ☪ ☸ ✡ ☯ ☦ ⛎ ♈️ ♉️ ♊️ ♋️ ♌️ ♍️ ♎️ ♏️ ♐️ ♑️ ♒️ ♓️ ⚛ ☢ ☣️ ✴️ ㊙️ ㊗️ ⛔️ ❌ ⭕️ ♨️ ❗️ ❕ ❓ ❔ ‼️ ⁉️ ⚜ 〽️ ⚠️ ♻️ ❇️ ✳️ ❎ ✅ ➿ Ⓜ️ ♿️ 0⃣ 1⃣ 2⃣ 3⃣ 4⃣ 5⃣ 6⃣ 7⃣ 8⃣ 9⃣ ▶️ ⏸ ⏯ ⏹ ⏺ ⏭ ⏮ ⏩ ⏪ ◀️ ⏫ ⏬ ➡️ ⬅️ ⬆️ ⬇️ ↗️ ↘️ ↙️ ↖️ ↕️ ↔️ ↪️ ↩️ ⤴️ ⤵️ #⃣ *⃣ ℹ️ 〰 ➰ ✔️ ➕ ➖ ➗ ✖️ © ® ™ ☑️ ⚪️ ⚫️ ▪️ ▫️ ⬛️ ⬜️ ◼️ ◻️ ◾️ ◽️ ♠️ ♣️ ♥️ ♦️‍ ☺️ ☹️ ☝️ ✌ ✍ ❤️ ❣ ☠ ♨️ ✈️ ⌛️ ⌚️ ♈️ ♉️ ♊️ ♋️ ♌️ ♍️ ♎️ ♏️ ♐️ ♑️ ♒️ ♓️ ☀️ ☁️ ☂ ❄️ ⛄️ ☄ ♠️ ♥️ ♦️ ♣️ ▶️ ◀️ ☎️ ⌨ ✉️ ✏️ ✒️ ✂️ ↗️ ➡️ ↘️ ↙️ ↖️ ↕️ ↔️ ↩️ ↪️ ✡ ☸ ☯ ✝ ☦ ☪ ☮ ☢ ☣ ☑️ ✔️ ✖️ ✳️ ✴️ ❇️ ‼️ © ® ™ Ⓜ️ ▪️ ▫️ #⃣ *⃣ 0⃣ 1⃣ 2⃣ 3⃣ 4⃣ 5⃣ 6⃣ 7⃣ 8⃣ 9⃣ ⁉️ ℹ️ ⤴️ ⤵️ ♻️ ◻️ ◼️ ◽️ ◾️ ☕️ ⚠️ ☔️ ⏏ ⬆️ ⬇️ ⬅️ ⚡️ ☘ ⚓️ ♿️ ⚒ ⚙ ⚗ ⚖ ⚔ ⚰ ⚱ ⚜ ⚛ ⚪️ ⚫️ ⭐️ ⬛️ ⬜️ ⛑ ⛰ ⛪️ ⛲️ ⛺️ ⛽️ ⛵️ ⛴ ⛔️ ⛅️ ⛈ ⛱ ⛄️ ⚽️ ⚾️ ⛳️ ⛸ ⛷ ⛹ ⛏ ⛓ ⛩ ⭕️ ❗️ ❦ ♕ ♛ ♔ ♖ ♜ ☾ → ⇒ ⟹ ⇨ ⇰ ➩ ➪ ➫ ➬ ➭ ➮ ➯ ➲ ➳ ➵ ➸ ➻ ➺ ➼ ➽ ☜ ☟ ➹ ➷ ↶ ↷ ✆ ⌘ ⎋ ⏎ ⏏ ⎈ ⎌ ⍟ ❥ ツ ღ ☻

other emojees is not supported by utf8mb4

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top