摘要:Ubuntu Server 服务器下使用apt-get 命令安装的mysql,默认不是utf8.在这里记录一下如何将编码修改成utf8. 办法解决: 1.查看mysql编码 show variables like '%character%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+-------------
1.修改相应数据库的编码格式: -- 修改数据库编码为utf8 ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_general_ci; 2.修改所有的数据格式均为utf8 -- 修改数据为utf8 SET NAMES 'utf8' 3.查看修改后的结果: -- 查看是否为utf8编码数据 show variables like "%char%";
在扩展Unity的时候,往往会用到一些属性,这里将常用的列一下. 1.属性只读: #if UNITY_EDITOR using UnityEditor; #endif using UnityEngine; public class ReadOnlyAttribute : PropertyAttribute { } #if UNITY_EDITOR [CustomPropertyDrawer(typeof(ReadOnlyAttribute))] public class ReadOnlyDraw