gbk encoding check function improve version