add encoding when open file