add guess encode logic when open a module lib file.