nickName.getBytes( "gb18030").length 如果直接.length的话,遇到某些带中文字符串的,linux和windows表现会不一致 转载于:https://blog.51cto.com/hsj69106/243408