mysql低版本针对超过3个字符的UTF-8字符保存出错。
解决方法1:直接过滤
private string test(string str)
{string result = Regex.Replace(str, @"\p{Cs}", "");
return result;
}
参考 http://blog.csdn.net/fengsh998/article/details/8639157
http://stackoverflow.com/questions/28023682/how-do-i-remove-emoji-characters-from-a-string
本文提供了一种解决MySQL低版本在保存超过3个字符的UTF-8字符时出现错误的方法,通过使用正则表达式过滤掉不符合标准的字符。详细介绍了两种解决路径,包括在线资源链接。


被折叠的 条评论
为什么被折叠?



