diff --git a/~dev_rating/application/classes/FileParser.php b/~dev_rating/application/classes/FileParser.php
index 18df0d8063bb6ef2110c1c8bc41c22a0d3033e52..7f7c1d910b3b313f33e8581c6f00d482ebe597f3 100644
--- a/~dev_rating/application/classes/FileParser.php
+++ b/~dev_rating/application/classes/FileParser.php
@@ -110,10 +110,10 @@ class FileParser
     public static function toUTF8($source_str) {
         // TODO: make it able to convert from any encoding to UTF-8
         $enc = mb_detect_encoding($source_str, mb_list_encodings(), true);
-        if ($enc === false)
-            return $source_str;
-        else if ($enc !== "UTF-8")
+        if ($enc === "ISO-8859-1" || !$enc)
             return mb_convert_encoding($source_str, "utf-8", "windows-1251");
+        else if ($enc !== "UTF-8")
+            return mb_convert_encoding($source_str, "utf-8", $enc);
         else
             return $source_str;
     }