Refactor syntax unicode setbuffer