added source_to_unicode method to deal with different encodings, davidhalter/jedi-vim#48

This commit is contained in:
David Halter
2012-12-19 20:35:24 +01:00
parent 15510a4c3b
commit 5e2e0a8f45
4 changed files with 49 additions and 11 deletions

View File

@@ -42,7 +42,7 @@ def get_directory_modules_for_name(mods, name):
def check_fs(path):
with open(path) as f:
source = f.read()
source = modules.source_to_unicode(f.read())
if name in source:
return modules.Module(path, source).parser.module