可以加入emoji表情功能吗?

可以加入emoji表情功能吗,我在iphone手机上访问我的wecenter3.1.9网站,输入一些emoji表情,提交,然后显示的是空白内容。想添加emoji表情功能,不知道怎么弄。附传送guodongzhi.com
已邀请:

cbddok

赞同来自:

测试一下表情,win10自带的表情输出测试。。
结果没有显示出来

fesiong - WeCenter第三方技术支持

赞同来自:

 我试一😄

fesiong - WeCenter第三方技术支持

赞同来自:

手把手教你让你的wecenter支持emoji表情

前提是,你的mysql数据库需要支持utf8mb4。你的数据库版本要大于等于MySQL 5.5.3,因为低版本不支持utf8mb4字符集。数据库版本低于MySQL 5.5.3的,请自行升级。

修改system/config/database.php
把utf8 改成utf8mb4

修改数据库字符集
ALTER SCHEMA `database_wecenter`  DEFAULT CHARACTER SET utf8mb4  DEFAULT COLLATE utf8mb4_unicode_ci ;

修改表的字符集

ALTER TABLE `aws_answer` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `answer_content` `answer_content` TEXT CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '回答内容' ;


ALTER TABLE `aws_answer_comments` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `message` `message` TEXT CHARACTER SET 'utf8mb4' NULL DEFAULT NULL ;


ALTER TABLE `aws_approval` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `data` `data` MEDIUMTEXT CHARACTER SET 'utf8mb4' NOT NULL ;


ALTER TABLE `aws_article` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `title` `title` VARCHAR(255) CHARACTER SET 'utf8mb4' NOT NULL ,
CHANGE COLUMN `message` `message` TEXT CHARACTER SET 'utf8mb4' NULL DEFAULT NULL ;


ALTER TABLE `aws_article_comments` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `message` `message` TEXT CHARACTER SET 'utf8mb4' NOT NULL ;


ALTER TABLE `aws_draft` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `data` `data` TEXT CHARACTER SET 'utf8mb4' NULL DEFAULT NULL ;


ALTER TABLE `aws_inbox` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `message` `message` TEXT CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '内容' ;


ALTER TABLE `aws_notification_data` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `data` `data` TEXT CHARACTER SET 'utf8mb4' NULL DEFAULT NULL ;


ALTER TABLE `aws_question` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `question_content` `question_content` VARCHAR(255) CHARACTER SET 'utf8mb4' NOT NULL DEFAULT '' COMMENT '问题内容' ,
CHANGE COLUMN `question_detail` `question_detail` TEXT CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '问题说明' ;


ALTER TABLE `aws_question_comments` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `message` `message` TEXT CHARACTER SET 'utf8mb4' NULL DEFAULT NULL ;


ALTER TABLE `aws_topic` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `topic_title` `topic_title` VARCHAR(64) CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '话题标题' ,
CHANGE COLUMN `topic_description` `topic_description` TEXT CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '话题描述' ;


ALTER TABLE `aws_users` 
CHARACTER SET = utf8mb4 , COLLATE = utf8mb4_unicode_ci ,
CHANGE COLUMN `user_name` `user_name` VARCHAR(255) CHARACTER SET 'utf8mb4' NULL DEFAULT NULL COMMENT '用户名' ;

修改my.cnf,此步可以省略,不是必须的。
[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

重启数据库。

现在你可以使用emoji表情了。
 

winegrower

赞同来自:

辩题c测试
12
34

要回复问题请先登录注册