Forgot password?
 Create new account
View 121|Reply 2

MySQL执行regexp_replace时Emoji变成问号

[Copy link]

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2023-11-5 06:28:39 |Read mode
Last edited by hbghlyj at 2023-11-5 19:07:00帖文
测试Emoji😥😥😥测试Emoji

运行replace
  1. UPDATE pre_forum_post SET `message`=replace('测试Emoji😥😥😥测试Emoji',"AAA","BBB")WHERE pid=56910';
Copy the Code

正常。
而换成regexp_replace后:
  1. UPDATE pre_forum_post SET `message`=replace('测试Emoji😥😥😥测试Emoji',"AAA","BBB")WHERE pid=56910';
Copy the Code

Emoji变成问号:
测试Emoji???测试Emoji

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2023-11-5 06:37:11
Last edited by hbghlyj at 2023-11-6 09:02:00最后没加 COLLATE utf8mb4_bin 导致的?

13

Threads

5

Posts

116

Credits

Credits
116

Show all posts

zhiwen Posted at 2023-11-5 08:03:41
致各位论坛网友:

由于 hbghlyj 操作数据库失误导致由 2023-9-26 至 2023-11-5 间期的所有帖子的内文都被清空,在此给大家真诚道歉。

现在我们正在浏览这期间的帖子,努力回忆内容,尽可能地多恢复一些,如果您还记得本帖原本的内容,也希望您能编辑回来,麻烦各位了。

手机版Mobile version|Leisure Math Forum

2025-4-20 22:20 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list