support utf-8 encoded text file