implemented buffer with handling for all utf-8 chars