久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何在 mysql 中插入 utf-8 mb4 字符(ios5 中的表情符

How to insert utf-8 mb4 character(emoji in ios5) in mysql?(如何在 mysql 中插入 utf-8 mb4 字符(ios5 中的表情符號)?)
本文介紹了如何在 mysql 中插入 utf-8 mb4 字符(ios5 中的表情符號)?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

我用的是mysql 5.5.10,它的character_sets是

I am using mysql 5.5.10, and its character_sets are

| character_set_client     | utf8mb4                    |
| character_set_connection | utf8mb4                    |
| character_set_database   | utf8mb4                    |
| character_set_filesystem | binary                     |
| character_set_results    | utf8mb4                    |
| character_set_server     | utf8mb4                    |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
| collation_connection     | utf8mb4_general_ci         |
| collation_database       | utf8mb4_general_ci         |
| collation_server         | utf8mb4_general_ci         |

我將 utf8mb4 從 utf8 更改為 iOS5 的表情符號.它們由 4 字節(jié)代碼表示.

I changed utf8mb4 from utf8 for iOS5's emoji. They are represented by 4byte code.

但是當(dāng)我插入 3 個笑臉表情符號時,'???'在mysql中.

But when I inserted 3 smiley emojis, '???' is in mysql.

它們是 3F 3F 3F(十六進(jìn)制).

They are 3F 3F 3F (Hex).

iOS4 的表情我可以很好地存儲,但 iOS5 的卻不行.

I can store iOS4's emojis well, but not iOS5's.

如何存儲 iOS5 的表情符號?

How could I store iOS5's emojis?

請幫幫我.

推薦答案

4 字節(jié) Unicode 字符尚未廣泛使用,因此并非所有應(yīng)用程序都完全支持它們.正確配置后,MySQL 5.5 可以正常使用 4 字節(jié)字符 - 檢查您的其他組件是否也可以使用它們.

4 byte Unicode characters aren't yet widely used, so not every application out there fully supports them. MySQL 5.5 works fine with 4 byte characters when properly configured – check if your other components can work with them as well.

還有一些其他的事情要檢查:

Here's a few other things to check out:

  • 除了設(shè)置客戶端 &服務(wù)器字符集,例如ALTER TABLE mytable charset=utf8mb4, MODIFY COLUMN textfield1 VARCHAR(255) CHARACTER SET utf8mb4,MODIFY COLUMN textfield2 VARCHAR(255) CHARACTER SET utf8mb4; 等等.

如果您的數(shù)據(jù)已經(jīng)在 utf8 字符集中,它應(yīng)該就地轉(zhuǎn)換為 utf8mb4,沒有任何問題.與往常一樣,在嘗試之前備份您的數(shù)據(jù)!

If your data is already in the utf8 character set, it should convert to utf8mb4 in place without any problems. As always, back up your data before trying!

還要確保您的應(yīng)用層將其數(shù)據(jù)庫連接的字符集設(shè)置為 utf8mb4.仔細(xì)檢查這是否真的發(fā)生了——如果您正在運行您選擇的框架的 mysql 客戶端庫的舊版本,它可能沒有使用 utf8mb4 支持進(jìn)行編譯,并且不會正確設(shè)置字符集.如果沒有,您可能需要自己更新或編譯.

Also make sure your app layer sets its database connections' character set to utf8mb4. Double-check this is actually happening?–?if you're running an older version of your chosen framework's mysql client library, it may not have been compiled with utf8mb4 support and it won't set the charset properly. If not, you may have to update it or compile it yourself.

通過 mysql 客戶端查看數(shù)據(jù)時,請確保您在可以顯示表情符號的機(jī)器上,并在運行任何查詢之前運行 SET NAMES utf8mb4.

When viewing your data through the mysql client, make sure you're on a machine that can display emoji, and run a SET NAMES utf8mb4 before running any queries.

一旦您的應(yīng)用程序的每個級別都可以支持新字符,您就應(yīng)該能夠在沒有任何損壞的情況下使用它們.

Once every level of your application can support the new characters, you should be able to use them without any corruption.

這篇關(guān)于如何在 mysql 中插入 utf-8 mb4 字符(ios5 中的表情符號)?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Can#39;t change target membership visibility in Xcode 4.5(無法更改 Xcode 4.5 中的目標(biāo)成員身份可見性)
UITableView: Handle cell selection in a mixed cell table view static and dynamic cells(UITableView:在混合單元格表視圖靜態(tài)和動態(tài)單元格中處理單元格選擇)
How to remove Address Bar in Safari in iOS?(如何在 iOS 中刪除 Safari 中的地址欄?)
iOS 5 SDK is gone after upgrade to Xcode 4.5(升級到 Xcode 4.5 后,iOS 5 SDK 消失了)
Having trouble creating UIImage from CIImage in iOS5(在 iOS5 中從 CIImage 創(chuàng)建 UIImage 時遇到問題)
Open target=quot;_blankquot; links outside of UIWebView in Safari(打開目標(biāo)=“_blank;Safari 中 UIWebView 之外的鏈接)
主站蜘蛛池模板: 成人激情视频免费在线观看 | 狠狠的干狠狠的操 | 欧美精品一区二区三区蜜桃视频 | 天堂视频中文在线 | 日本超碰 | 中文字幕日本一区二区 | av中文字幕网 | 中文天堂在线一区 | 国产精品一区二区久久久久 | 久久久久成人精品 | 91最新在线视频 | 亚洲欧洲精品一区 | 蜜桃视频一区二区三区 | 国产一区二区三区在线观看免费 | 中文字幕一页二页 | 羞羞视频在线观看 | 久久国产精品免费一区二区三区 | 久久精品一区二区三区四区 | 久草免费在线视频 | 欧美日在线 | 日本午夜免费福利视频 | 久久人人爽人人爽人人片av免费 | 一级片在线免费播放 | 暖暖日本在线视频 | 久久久天堂| 国产区第一页 | 国产真实乱对白精彩久久小说 | av电影手机在线看 | 亚洲精品一区二区网址 | aa级毛片毛片免费观看久 | 亚洲欧美一区二区三区视频 | 久久精品一区 | 国产1区2区3区 | 久久精品国产一区二区电影 | av在线播放网址 | 可以免费观看的av片 | 成人在线看片 | 亚洲精品久久久一区二区三区 | 国产小视频自拍 | 毛片视频网站 | 欧美日韩精品一区 |