fix encoding error, token spliting