Prechádzať zdrojové kódy

hard-coded for charset Windows-1250

Marino Faggiana 7 rokov pred
rodič
commit
15da8b0aa0
1 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 4 0
      iOSClient/Library/NCUchardet/NCUchardet.m

+ 4 - 0
iOSClient/Library/NCUchardet/NCUchardet.m

@@ -68,6 +68,10 @@
     
     
     uchardet_reset(_detector);
     uchardet_reset(_detector);
     
     
+    // In modern applications UTF-8 or UTF-16 is a preferred encoding. 0.2% of all web pages use Windows-1250 in February 2016. (Wikipedia)
+    if ([encoding isEqualToString:@"WINDOWS-1250"])
+        encoding = @"UTF-8";
+    
     return encoding;
     return encoding;
 }
 }