handling utf8 encoding for c++