Encode before checking imdb content. fix #2186