update string encoding method
.