fix some code and convert phagspa character to unicode