Address encoding issues when using search engine on Windows (closes #29)

This commit is contained in:
Christophe Dumez
2012-09-15 16:54:09 +03:00
parent 8a12382f1f
commit d12c5cdf55
6 changed files with 775 additions and 391 deletions

View File

@@ -26,7 +26,7 @@
# POSSIBILITY OF SUCH DAMAGE.
#VERSION: 1.23
#VERSION: 1.31
# Author:
# Fabien Devaux <fab AT gnux DOT info>
@@ -42,6 +42,8 @@ import threading
import os
import glob
import fix_encoding
THREADED = True
CATEGORIES = ('all', 'movies', 'tv', 'music', 'games', 'anime', 'software', 'pictures', 'books')
@@ -111,6 +113,9 @@ class EngineLauncher(threading.Thread):
self.engine.search(self.what)
if __name__ == '__main__':
# Make sure we enforce utf-8 encoding
fix_encoding.fix_encoding()
if len(sys.argv) < 2:
raise SystemExit('./nova2.py [all|engine1[,engine2]*] <category> <keywords>\navailable engines: %s'%
(','.join(supported_engines)))