more clang, fixed detect encoding