Fix search engine encoding issues with python3 on Windows

Closes #1996

@sledgehammer999