转字符就可以了:
String nick = 微信昵称StringBuilder nicksb = new StringBuilder()
int l = nick.length()
for (int i = 0 i < l i++) {
char _s = nick.charAt(i)
if (isEmojiCharacter(_s)) {
nicksb.append(_s)
}
}
nicksb.toString() 这个就可以
public static boolean isEmojiCharacter(char codePoint) {
return (codePoint == 0x0) ||
(codePoint == 0x9) ||
(codePoint == 0xA) ||
(codePoint == 0xD) ||
((codePoint >= 0x20) && (codePoint <= 0xD7FF)) ||
((codePoint >= 0xE000) && (codePoint <= 0xFFFD)) ||
((codePoint >= 0x10000) && (codePoint <= 0x10FFFF))
}
1、可能网卡,到网络通畅处修改昵称后保存。2、如果还是不对的话,微信升级到最新版本后再修改昵称后保存。
3、以上方法都用过之后都不成功的话,建议把手机重启后再修改。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)