mac 设置 MySQL 数据库默认编码(字符集)为 UTF-8 原文链接:https://juejin.im/post/5bbdca76e51d45021147de44 鉴于有些刚接触 MySQL 数据库的人,经常会碰到数据库中文显示的问题,MySQL 数据库刚安装时默认编码是 latin1,所以如果在数据库建表的时候没有设置 DEFAULT CHARSET=utf8 的话,就会导致数据库无法设置或显示中文的问题,下面给出在 Mac 下将 MySQL 的默认编码改为 UTF-8. 查看自己
LInux下使用mbstowcs函数可以将char转化为wchar_t函数含义:convert a multibyte string to a wide char string说明: The behaviour of mbstowcs depends on the LC_CTYPE category of the current locale返回值: The mbstowcs() function returns the number of wide characters th