fix some bug of socket under unicode