Adding better utf8 code when not in C++11 mode as suggested by netheril96 on issue #23.