Marino Faggiana 7 years ago
parent
commit
5f4c969c6a
35 changed files with 4265 additions and 262 deletions
  1. 272 212
      Nextcloud.xcodeproj/project.pbxproj
  2. 16 1
      iOSClient/Library/NCUchardet/src/Big5Freq.tab
  3. 292 0
      iOSClient/Library/NCUchardet/src/CharDistribution.cpp
  4. 281 0
      iOSClient/Library/NCUchardet/src/LangModels/LangCzechModel.cpp
  5. 263 0
      iOSClient/Library/NCUchardet/src/LangModels/LangDanishModel.cpp
  6. 291 0
      iOSClient/Library/NCUchardet/src/LangModels/LangFinnishModel.cpp
  7. 230 0
      iOSClient/Library/NCUchardet/src/LangModels/LangFrenchModel.cpp
  8. 264 0
      iOSClient/Library/NCUchardet/src/LangModels/LangItalianModel.cpp
  9. 207 0
      iOSClient/Library/NCUchardet/src/LangModels/LangLatvianModel.cpp
  10. 206 0
      iOSClient/Library/NCUchardet/src/LangModels/LangLithuanianModel.cpp
  11. 137 0
      iOSClient/Library/NCUchardet/src/LangModels/LangMalteseModel.cpp
  12. 298 0
      iOSClient/Library/NCUchardet/src/LangModels/LangPolishModel.cpp
  13. 237 0
      iOSClient/Library/NCUchardet/src/LangModels/LangPortugueseModel.cpp
  14. 232 0
      iOSClient/Library/NCUchardet/src/LangModels/LangRomanianModel.cpp
  15. 289 0
      iOSClient/Library/NCUchardet/src/LangModels/LangRussianModel.cpp
  16. 259 0
      iOSClient/Library/NCUchardet/src/LangModels/LangSloveneModel.cpp
  17. 261 0
      iOSClient/Library/NCUchardet/src/LangModels/LangSpanishModel.cpp
  18. 1 1
      iOSClient/Library/NCUchardet/src/LangModels/LangThaiModel.cpp
  19. 10 9
      iOSClient/Library/NCUchardet/src/nsBig5Prober.h
  20. 1 1
      iOSClient/Library/NCUchardet/src/nsEUCJPProber.cpp
  21. 1 1
      iOSClient/Library/NCUchardet/src/nsEUCJPProber.h
  22. 6 1
      iOSClient/Library/NCUchardet/src/nsEUCKRProber.h
  23. 1 1
      iOSClient/Library/NCUchardet/src/nsEUCTWProber.cpp
  24. 1 1
      iOSClient/Library/NCUchardet/src/nsEUCTWProber.h
  25. 5 1
      iOSClient/Library/NCUchardet/src/nsEscCharsetProber.h
  26. 1 1
      iOSClient/Library/NCUchardet/src/nsGB2312Prober.cpp
  27. 80 0
      iOSClient/Library/NCUchardet/src/nsGB2312Prober.h
  28. 1 1
      iOSClient/Library/NCUchardet/src/nsSBCSGroupProber.h
  29. 1 1
      iOSClient/Library/NCUchardet/src/nsSBCharSetProber.cpp
  30. 80 0
      iOSClient/Library/NCUchardet/src/nsSBCharSetProber.h
  31. 1 1
      iOSClient/Library/NCUchardet/src/nsSJISProber.cpp
  32. 1 1
      iOSClient/Library/NCUchardet/src/nsSJISProber.h
  33. 28 24
      iOSClient/Library/NCUchardet/src/nsUTF8Prober.h
  34. 11 3
      iOSClient/Library/NCUchardet/src/nsUniversalDetector.h
  35. 0 1
      iOSClient/Main/CCDetail.m

+ 272 - 212
Nextcloud.xcodeproj/project.pbxproj

@@ -307,47 +307,62 @@
 		F76B3CCF1EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
 		F76B3CD01EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
 		F76B3CD11EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
-		F76BEEB71F46E74000332727 /* Big5Freq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEE741F46E74000332727 /* Big5Freq.tab */; };
-		F76BEEB81F46E74000332727 /* CharDistribution.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE751F46E74000332727 /* CharDistribution.cpp */; };
-		F76BEEB91F46E74000332727 /* CMakeLists.txt in Resources */ = {isa = PBXBuildFile; fileRef = F76BEE771F46E74000332727 /* CMakeLists.txt */; };
-		F76BEEBA1F46E74000332727 /* EUCKRFreq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEE781F46E74000332727 /* EUCKRFreq.tab */; };
-		F76BEEBB1F46E74000332727 /* EUCTWFreq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEE791F46E74000332727 /* EUCTWFreq.tab */; };
-		F76BEEBC1F46E74000332727 /* GB2312Freq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEE7A1F46E74000332727 /* GB2312Freq.tab */; };
-		F76BEEBD1F46E74000332727 /* JISFreq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEE7B1F46E74000332727 /* JISFreq.tab */; };
-		F76BEEBE1F46E74000332727 /* JpCntx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE7C1F46E74000332727 /* JpCntx.cpp */; };
-		F76BEEBF1F46E74000332727 /* LangArabicModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE7F1F46E74000332727 /* LangArabicModel.cpp */; };
-		F76BEEC01F46E74000332727 /* LangBulgarianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE801F46E74000332727 /* LangBulgarianModel.cpp */; };
-		F76BEEC11F46E74000332727 /* LangDanishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE811F46E74000332727 /* LangDanishModel.cpp */; };
-		F76BEEC21F46E74000332727 /* LangEsperantoModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE821F46E74000332727 /* LangEsperantoModel.cpp */; };
-		F76BEEC31F46E74000332727 /* LangFrenchModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE831F46E74000332727 /* LangFrenchModel.cpp */; };
-		F76BEEC41F46E74000332727 /* LangGermanModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE841F46E74000332727 /* LangGermanModel.cpp */; };
-		F76BEEC51F46E74000332727 /* LangGreekModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE851F46E74000332727 /* LangGreekModel.cpp */; };
-		F76BEEC61F46E74000332727 /* LangHebrewModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE861F46E74000332727 /* LangHebrewModel.cpp */; };
-		F76BEEC71F46E74000332727 /* LangHungarianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE871F46E74000332727 /* LangHungarianModel.cpp */; };
-		F76BEEC81F46E74000332727 /* LangRussianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE881F46E74000332727 /* LangRussianModel.cpp */; };
-		F76BEEC91F46E74000332727 /* LangSpanishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE891F46E74000332727 /* LangSpanishModel.cpp */; };
-		F76BEECA1F46E74000332727 /* LangThaiModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE8A1F46E74000332727 /* LangThaiModel.cpp */; };
-		F76BEECB1F46E74000332727 /* LangTurkishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE8B1F46E74000332727 /* LangTurkishModel.cpp */; };
-		F76BEECC1F46E74000332727 /* LangVietnameseModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE8C1F46E74000332727 /* LangVietnameseModel.cpp */; };
-		F76BEECD1F46E74000332727 /* nsBig5Prober.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE8D1F46E74000332727 /* nsBig5Prober.cpp */; };
-		F76BEECE1F46E74000332727 /* nsCharSetProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE8F1F46E74000332727 /* nsCharSetProber.cpp */; };
-		F76BEECF1F46E74000332727 /* nsEscCharsetProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE931F46E74000332727 /* nsEscCharsetProber.cpp */; };
-		F76BEED01F46E74000332727 /* nsEscSM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE951F46E74000332727 /* nsEscSM.cpp */; };
-		F76BEED11F46E74000332727 /* nsEUCJPProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE961F46E74000332727 /* nsEUCJPProber.cpp */; };
-		F76BEED21F46E74000332727 /* nsEUCKRProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE981F46E74000332727 /* nsEUCKRProber.cpp */; };
-		F76BEED31F46E74000332727 /* nsEUCTWProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE9A1F46E74000332727 /* nsEUCTWProber.cpp */; };
-		F76BEED41F46E74000332727 /* nsGB2312Prober.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE9C1F46E74000332727 /* nsGB2312Prober.cpp */; };
-		F76BEED51F46E74000332727 /* nsHebrewProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEE9E1F46E74000332727 /* nsHebrewProber.cpp */; };
-		F76BEED61F46E74000332727 /* nsLatin1Prober.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEA01F46E74000332727 /* nsLatin1Prober.cpp */; };
-		F76BEED71F46E74000332727 /* nsMBCSGroupProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEA21F46E74000332727 /* nsMBCSGroupProber.cpp */; };
-		F76BEED81F46E74000332727 /* nsMBCSSM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEA41F46E74000332727 /* nsMBCSSM.cpp */; };
-		F76BEED91F46E74000332727 /* nsSBCharSetProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEA61F46E74000332727 /* nsSBCharSetProber.cpp */; };
-		F76BEEDA1F46E74000332727 /* nsSBCSGroupProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEA81F46E74000332727 /* nsSBCSGroupProber.cpp */; };
-		F76BEEDB1F46E74000332727 /* nsSJISProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEAA1F46E74000332727 /* nsSJISProber.cpp */; };
-		F76BEEDC1F46E74000332727 /* nsUniversalDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEAC1F46E74000332727 /* nsUniversalDetector.cpp */; };
-		F76BEEDD1F46E74000332727 /* nsUTF8Prober.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEAE1F46E74000332727 /* nsUTF8Prober.cpp */; };
-		F76BEEDE1F46E74000332727 /* symbols.cmake in Resources */ = {isa = PBXBuildFile; fileRef = F76BEEB11F46E74000332727 /* symbols.cmake */; };
-		F76BEEE11F46E74000332727 /* uchardet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEB51F46E74000332727 /* uchardet.cpp */; };
+		F76BEF341F46F40400332727 /* Big5Freq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEEE51F46F40400332727 /* Big5Freq.tab */; };
+		F76BEF351F46F40400332727 /* CharDistribution.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEE61F46F40400332727 /* CharDistribution.cpp */; };
+		F76BEF361F46F40400332727 /* CMakeLists.txt in Resources */ = {isa = PBXBuildFile; fileRef = F76BEEE81F46F40400332727 /* CMakeLists.txt */; };
+		F76BEF371F46F40400332727 /* EUCKRFreq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEEE91F46F40400332727 /* EUCKRFreq.tab */; };
+		F76BEF381F46F40400332727 /* EUCTWFreq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEEEA1F46F40400332727 /* EUCTWFreq.tab */; };
+		F76BEF391F46F40400332727 /* GB2312Freq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEEEB1F46F40400332727 /* GB2312Freq.tab */; };
+		F76BEF3A1F46F40400332727 /* JISFreq.tab in Resources */ = {isa = PBXBuildFile; fileRef = F76BEEEC1F46F40400332727 /* JISFreq.tab */; };
+		F76BEF3B1F46F40400332727 /* JpCntx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEED1F46F40400332727 /* JpCntx.cpp */; };
+		F76BEF3C1F46F40400332727 /* LangArabicModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF01F46F40400332727 /* LangArabicModel.cpp */; };
+		F76BEF3D1F46F40400332727 /* LangBulgarianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF11F46F40400332727 /* LangBulgarianModel.cpp */; };
+		F76BEF3E1F46F40400332727 /* LangCroatianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF21F46F40400332727 /* LangCroatianModel.cpp */; };
+		F76BEF3F1F46F40400332727 /* LangCzechModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF31F46F40400332727 /* LangCzechModel.cpp */; };
+		F76BEF401F46F40400332727 /* LangDanishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF41F46F40400332727 /* LangDanishModel.cpp */; };
+		F76BEF411F46F40400332727 /* LangEsperantoModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF51F46F40400332727 /* LangEsperantoModel.cpp */; };
+		F76BEF421F46F40400332727 /* LangEstonianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF61F46F40400332727 /* LangEstonianModel.cpp */; };
+		F76BEF431F46F40400332727 /* LangFinnishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF71F46F40400332727 /* LangFinnishModel.cpp */; };
+		F76BEF441F46F40400332727 /* LangFrenchModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF81F46F40400332727 /* LangFrenchModel.cpp */; };
+		F76BEF451F46F40400332727 /* LangGermanModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEF91F46F40400332727 /* LangGermanModel.cpp */; };
+		F76BEF461F46F40400332727 /* LangGreekModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEFA1F46F40400332727 /* LangGreekModel.cpp */; };
+		F76BEF471F46F40400332727 /* LangHebrewModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEFB1F46F40400332727 /* LangHebrewModel.cpp */; };
+		F76BEF481F46F40400332727 /* LangHungarianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEFC1F46F40400332727 /* LangHungarianModel.cpp */; };
+		F76BEF491F46F40400332727 /* LangIrishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEFD1F46F40400332727 /* LangIrishModel.cpp */; };
+		F76BEF4A1F46F40400332727 /* LangItalianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEFE1F46F40400332727 /* LangItalianModel.cpp */; };
+		F76BEF4B1F46F40400332727 /* LangLatvianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEEFF1F46F40400332727 /* LangLatvianModel.cpp */; };
+		F76BEF4C1F46F40400332727 /* LangLithuanianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF001F46F40400332727 /* LangLithuanianModel.cpp */; };
+		F76BEF4D1F46F40400332727 /* LangMalteseModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF011F46F40400332727 /* LangMalteseModel.cpp */; };
+		F76BEF4E1F46F40400332727 /* LangPolishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF021F46F40400332727 /* LangPolishModel.cpp */; };
+		F76BEF4F1F46F40400332727 /* LangPortugueseModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF031F46F40400332727 /* LangPortugueseModel.cpp */; };
+		F76BEF501F46F40400332727 /* LangRomanianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF041F46F40400332727 /* LangRomanianModel.cpp */; };
+		F76BEF511F46F40400332727 /* LangRussianModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF051F46F40400332727 /* LangRussianModel.cpp */; };
+		F76BEF521F46F40400332727 /* LangSlovakModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF061F46F40400332727 /* LangSlovakModel.cpp */; };
+		F76BEF531F46F40400332727 /* LangSloveneModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF071F46F40400332727 /* LangSloveneModel.cpp */; };
+		F76BEF541F46F40400332727 /* LangSpanishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF081F46F40400332727 /* LangSpanishModel.cpp */; };
+		F76BEF551F46F40400332727 /* LangSwedishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF091F46F40400332727 /* LangSwedishModel.cpp */; };
+		F76BEF561F46F40400332727 /* LangThaiModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF0A1F46F40400332727 /* LangThaiModel.cpp */; };
+		F76BEF571F46F40400332727 /* LangTurkishModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF0B1F46F40400332727 /* LangTurkishModel.cpp */; };
+		F76BEF581F46F40400332727 /* LangVietnameseModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF0C1F46F40400332727 /* LangVietnameseModel.cpp */; };
+		F76BEF591F46F40400332727 /* nsBig5Prober.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF0D1F46F40400332727 /* nsBig5Prober.cpp */; };
+		F76BEF5A1F46F40400332727 /* nsCharSetProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF0F1F46F40400332727 /* nsCharSetProber.cpp */; };
+		F76BEF5B1F46F40400332727 /* nsEscCharsetProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF131F46F40400332727 /* nsEscCharsetProber.cpp */; };
+		F76BEF5C1F46F40400332727 /* nsEscSM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF151F46F40400332727 /* nsEscSM.cpp */; };
+		F76BEF5D1F46F40400332727 /* nsEUCJPProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF161F46F40400332727 /* nsEUCJPProber.cpp */; };
+		F76BEF5E1F46F40400332727 /* nsEUCKRProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF181F46F40400332727 /* nsEUCKRProber.cpp */; };
+		F76BEF5F1F46F40400332727 /* nsEUCTWProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF1A1F46F40400332727 /* nsEUCTWProber.cpp */; };
+		F76BEF601F46F40400332727 /* nsGB2312Prober.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF1C1F46F40400332727 /* nsGB2312Prober.cpp */; };
+		F76BEF611F46F40400332727 /* nsHebrewProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF1E1F46F40400332727 /* nsHebrewProber.cpp */; };
+		F76BEF621F46F40400332727 /* nsLatin1Prober.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF201F46F40400332727 /* nsLatin1Prober.cpp */; };
+		F76BEF631F46F40400332727 /* nsMBCSGroupProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF221F46F40400332727 /* nsMBCSGroupProber.cpp */; };
+		F76BEF641F46F40400332727 /* nsMBCSSM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF241F46F40400332727 /* nsMBCSSM.cpp */; };
+		F76BEF651F46F40400332727 /* nsSBCharSetProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF261F46F40400332727 /* nsSBCharSetProber.cpp */; };
+		F76BEF661F46F40400332727 /* nsSBCSGroupProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF281F46F40400332727 /* nsSBCSGroupProber.cpp */; };
+		F76BEF671F46F40400332727 /* nsSJISProber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF2A1F46F40400332727 /* nsSJISProber.cpp */; };
+		F76BEF681F46F40400332727 /* nsUniversalDetector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF2C1F46F40400332727 /* nsUniversalDetector.cpp */; };
+		F76BEF691F46F40400332727 /* nsUTF8Prober.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF2E1F46F40400332727 /* nsUTF8Prober.cpp */; };
+		F76BEF6A1F46F40400332727 /* symbols.cmake in Resources */ = {isa = PBXBuildFile; fileRef = F76BEF311F46F40400332727 /* symbols.cmake */; };
+		F76BEF6B1F46F40400332727 /* uchardet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F76BEF321F46F40400332727 /* uchardet.cpp */; };
 		F76F23341ED4603700C40023 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F76F23331ED4603700C40023 /* LaunchScreen.xib */; };
 		F77B0DF01D118A16002130FE /* UIImage+Resizing.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F04CA1C889184008DAB36 /* UIImage+Resizing.m */; };
 		F77B0DF21D118A16002130FE /* CCUploadFromOtherUpp.m in Sources */ = {isa = PBXBuildFile; fileRef = F7956FCA1B4886E60085DEA3 /* CCUploadFromOtherUpp.m */; };
@@ -1405,69 +1420,84 @@
 		F768EB021BFB7EA900B6E341 /* CCShare.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = CCShare.storyboard; sourceTree = "<group>"; };
 		F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCBrand.swift; sourceTree = "<group>"; };
 		F76B3CDC1EAE4D9100921AC9 /* cryptocloud 8.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "cryptocloud 8.xcdatamodel"; sourceTree = "<group>"; };
-		F76BEE741F46E74000332727 /* Big5Freq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Big5Freq.tab; sourceTree = "<group>"; };
-		F76BEE751F46E74000332727 /* CharDistribution.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CharDistribution.cpp; sourceTree = "<group>"; };
-		F76BEE761F46E74000332727 /* CharDistribution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharDistribution.h; sourceTree = "<group>"; };
-		F76BEE771F46E74000332727 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		F76BEE781F46E74000332727 /* EUCKRFreq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EUCKRFreq.tab; sourceTree = "<group>"; };
-		F76BEE791F46E74000332727 /* EUCTWFreq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EUCTWFreq.tab; sourceTree = "<group>"; };
-		F76BEE7A1F46E74000332727 /* GB2312Freq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GB2312Freq.tab; sourceTree = "<group>"; };
-		F76BEE7B1F46E74000332727 /* JISFreq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = JISFreq.tab; sourceTree = "<group>"; };
-		F76BEE7C1F46E74000332727 /* JpCntx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JpCntx.cpp; sourceTree = "<group>"; };
-		F76BEE7D1F46E74000332727 /* JpCntx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JpCntx.h; sourceTree = "<group>"; };
-		F76BEE7F1F46E74000332727 /* LangArabicModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangArabicModel.cpp; sourceTree = "<group>"; };
-		F76BEE801F46E74000332727 /* LangBulgarianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangBulgarianModel.cpp; sourceTree = "<group>"; };
-		F76BEE811F46E74000332727 /* LangDanishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangDanishModel.cpp; sourceTree = "<group>"; };
-		F76BEE821F46E74000332727 /* LangEsperantoModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangEsperantoModel.cpp; sourceTree = "<group>"; };
-		F76BEE831F46E74000332727 /* LangFrenchModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangFrenchModel.cpp; sourceTree = "<group>"; };
-		F76BEE841F46E74000332727 /* LangGermanModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangGermanModel.cpp; sourceTree = "<group>"; };
-		F76BEE851F46E74000332727 /* LangGreekModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangGreekModel.cpp; sourceTree = "<group>"; };
-		F76BEE861F46E74000332727 /* LangHebrewModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangHebrewModel.cpp; sourceTree = "<group>"; };
-		F76BEE871F46E74000332727 /* LangHungarianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangHungarianModel.cpp; sourceTree = "<group>"; };
-		F76BEE881F46E74000332727 /* LangRussianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangRussianModel.cpp; sourceTree = "<group>"; };
-		F76BEE891F46E74000332727 /* LangSpanishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangSpanishModel.cpp; sourceTree = "<group>"; };
-		F76BEE8A1F46E74000332727 /* LangThaiModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangThaiModel.cpp; sourceTree = "<group>"; };
-		F76BEE8B1F46E74000332727 /* LangTurkishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangTurkishModel.cpp; sourceTree = "<group>"; };
-		F76BEE8C1F46E74000332727 /* LangVietnameseModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangVietnameseModel.cpp; sourceTree = "<group>"; };
-		F76BEE8D1F46E74000332727 /* nsBig5Prober.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsBig5Prober.cpp; sourceTree = "<group>"; };
-		F76BEE8E1F46E74000332727 /* nsBig5Prober.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsBig5Prober.h; sourceTree = "<group>"; };
-		F76BEE8F1F46E74000332727 /* nsCharSetProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsCharSetProber.cpp; sourceTree = "<group>"; };
-		F76BEE901F46E74000332727 /* nsCharSetProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsCharSetProber.h; sourceTree = "<group>"; };
-		F76BEE911F46E74000332727 /* nsCodingStateMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsCodingStateMachine.h; sourceTree = "<group>"; };
-		F76BEE921F46E74000332727 /* nscore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nscore.h; sourceTree = "<group>"; };
-		F76BEE931F46E74000332727 /* nsEscCharsetProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEscCharsetProber.cpp; sourceTree = "<group>"; };
-		F76BEE941F46E74000332727 /* nsEscCharsetProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsEscCharsetProber.h; sourceTree = "<group>"; };
-		F76BEE951F46E74000332727 /* nsEscSM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEscSM.cpp; sourceTree = "<group>"; };
-		F76BEE961F46E74000332727 /* nsEUCJPProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEUCJPProber.cpp; sourceTree = "<group>"; };
-		F76BEE971F46E74000332727 /* nsEUCJPProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsEUCJPProber.h; sourceTree = "<group>"; };
-		F76BEE981F46E74000332727 /* nsEUCKRProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEUCKRProber.cpp; sourceTree = "<group>"; };
-		F76BEE991F46E74000332727 /* nsEUCKRProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsEUCKRProber.h; sourceTree = "<group>"; };
-		F76BEE9A1F46E74000332727 /* nsEUCTWProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEUCTWProber.cpp; sourceTree = "<group>"; };
-		F76BEE9B1F46E74000332727 /* nsEUCTWProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsEUCTWProber.h; sourceTree = "<group>"; };
-		F76BEE9C1F46E74000332727 /* nsGB2312Prober.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsGB2312Prober.cpp; sourceTree = "<group>"; };
-		F76BEE9D1F46E74000332727 /* nsGB2312Prober.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsGB2312Prober.h; sourceTree = "<group>"; };
-		F76BEE9E1F46E74000332727 /* nsHebrewProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsHebrewProber.cpp; sourceTree = "<group>"; };
-		F76BEE9F1F46E74000332727 /* nsHebrewProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsHebrewProber.h; sourceTree = "<group>"; };
-		F76BEEA01F46E74000332727 /* nsLatin1Prober.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsLatin1Prober.cpp; sourceTree = "<group>"; };
-		F76BEEA11F46E74000332727 /* nsLatin1Prober.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsLatin1Prober.h; sourceTree = "<group>"; };
-		F76BEEA21F46E74000332727 /* nsMBCSGroupProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsMBCSGroupProber.cpp; sourceTree = "<group>"; };
-		F76BEEA31F46E74000332727 /* nsMBCSGroupProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsMBCSGroupProber.h; sourceTree = "<group>"; };
-		F76BEEA41F46E74000332727 /* nsMBCSSM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsMBCSSM.cpp; sourceTree = "<group>"; };
-		F76BEEA51F46E74000332727 /* nsPkgInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsPkgInt.h; sourceTree = "<group>"; };
-		F76BEEA61F46E74000332727 /* nsSBCharSetProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsSBCharSetProber.cpp; sourceTree = "<group>"; };
-		F76BEEA71F46E74000332727 /* nsSBCharSetProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsSBCharSetProber.h; sourceTree = "<group>"; };
-		F76BEEA81F46E74000332727 /* nsSBCSGroupProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsSBCSGroupProber.cpp; sourceTree = "<group>"; };
-		F76BEEA91F46E74000332727 /* nsSBCSGroupProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsSBCSGroupProber.h; sourceTree = "<group>"; };
-		F76BEEAA1F46E74000332727 /* nsSJISProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsSJISProber.cpp; sourceTree = "<group>"; };
-		F76BEEAB1F46E74000332727 /* nsSJISProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsSJISProber.h; sourceTree = "<group>"; };
-		F76BEEAC1F46E74000332727 /* nsUniversalDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsUniversalDetector.cpp; sourceTree = "<group>"; };
-		F76BEEAD1F46E74000332727 /* nsUniversalDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsUniversalDetector.h; sourceTree = "<group>"; };
-		F76BEEAE1F46E74000332727 /* nsUTF8Prober.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsUTF8Prober.cpp; sourceTree = "<group>"; };
-		F76BEEAF1F46E74000332727 /* nsUTF8Prober.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsUTF8Prober.h; sourceTree = "<group>"; };
-		F76BEEB01F46E74000332727 /* prmem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prmem.h; sourceTree = "<group>"; };
-		F76BEEB11F46E74000332727 /* symbols.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = symbols.cmake; sourceTree = "<group>"; };
-		F76BEEB51F46E74000332727 /* uchardet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uchardet.cpp; sourceTree = "<group>"; };
-		F76BEEB61F46E74000332727 /* uchardet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uchardet.h; sourceTree = "<group>"; };
+		F76BEEE51F46F40400332727 /* Big5Freq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Big5Freq.tab; sourceTree = "<group>"; };
+		F76BEEE61F46F40400332727 /* CharDistribution.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CharDistribution.cpp; sourceTree = "<group>"; };
+		F76BEEE71F46F40400332727 /* CharDistribution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharDistribution.h; sourceTree = "<group>"; };
+		F76BEEE81F46F40400332727 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
+		F76BEEE91F46F40400332727 /* EUCKRFreq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EUCKRFreq.tab; sourceTree = "<group>"; };
+		F76BEEEA1F46F40400332727 /* EUCTWFreq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EUCTWFreq.tab; sourceTree = "<group>"; };
+		F76BEEEB1F46F40400332727 /* GB2312Freq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GB2312Freq.tab; sourceTree = "<group>"; };
+		F76BEEEC1F46F40400332727 /* JISFreq.tab */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = JISFreq.tab; sourceTree = "<group>"; };
+		F76BEEED1F46F40400332727 /* JpCntx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JpCntx.cpp; sourceTree = "<group>"; };
+		F76BEEEE1F46F40400332727 /* JpCntx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JpCntx.h; sourceTree = "<group>"; };
+		F76BEEF01F46F40400332727 /* LangArabicModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangArabicModel.cpp; sourceTree = "<group>"; };
+		F76BEEF11F46F40400332727 /* LangBulgarianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangBulgarianModel.cpp; sourceTree = "<group>"; };
+		F76BEEF21F46F40400332727 /* LangCroatianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangCroatianModel.cpp; sourceTree = "<group>"; };
+		F76BEEF31F46F40400332727 /* LangCzechModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangCzechModel.cpp; sourceTree = "<group>"; };
+		F76BEEF41F46F40400332727 /* LangDanishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangDanishModel.cpp; sourceTree = "<group>"; };
+		F76BEEF51F46F40400332727 /* LangEsperantoModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangEsperantoModel.cpp; sourceTree = "<group>"; };
+		F76BEEF61F46F40400332727 /* LangEstonianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangEstonianModel.cpp; sourceTree = "<group>"; };
+		F76BEEF71F46F40400332727 /* LangFinnishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangFinnishModel.cpp; sourceTree = "<group>"; };
+		F76BEEF81F46F40400332727 /* LangFrenchModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangFrenchModel.cpp; sourceTree = "<group>"; };
+		F76BEEF91F46F40400332727 /* LangGermanModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangGermanModel.cpp; sourceTree = "<group>"; };
+		F76BEEFA1F46F40400332727 /* LangGreekModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangGreekModel.cpp; sourceTree = "<group>"; };
+		F76BEEFB1F46F40400332727 /* LangHebrewModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangHebrewModel.cpp; sourceTree = "<group>"; };
+		F76BEEFC1F46F40400332727 /* LangHungarianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangHungarianModel.cpp; sourceTree = "<group>"; };
+		F76BEEFD1F46F40400332727 /* LangIrishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangIrishModel.cpp; sourceTree = "<group>"; };
+		F76BEEFE1F46F40400332727 /* LangItalianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangItalianModel.cpp; sourceTree = "<group>"; };
+		F76BEEFF1F46F40400332727 /* LangLatvianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangLatvianModel.cpp; sourceTree = "<group>"; };
+		F76BEF001F46F40400332727 /* LangLithuanianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangLithuanianModel.cpp; sourceTree = "<group>"; };
+		F76BEF011F46F40400332727 /* LangMalteseModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangMalteseModel.cpp; sourceTree = "<group>"; };
+		F76BEF021F46F40400332727 /* LangPolishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangPolishModel.cpp; sourceTree = "<group>"; };
+		F76BEF031F46F40400332727 /* LangPortugueseModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangPortugueseModel.cpp; sourceTree = "<group>"; };
+		F76BEF041F46F40400332727 /* LangRomanianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangRomanianModel.cpp; sourceTree = "<group>"; };
+		F76BEF051F46F40400332727 /* LangRussianModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangRussianModel.cpp; sourceTree = "<group>"; };
+		F76BEF061F46F40400332727 /* LangSlovakModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangSlovakModel.cpp; sourceTree = "<group>"; };
+		F76BEF071F46F40400332727 /* LangSloveneModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangSloveneModel.cpp; sourceTree = "<group>"; };
+		F76BEF081F46F40400332727 /* LangSpanishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangSpanishModel.cpp; sourceTree = "<group>"; };
+		F76BEF091F46F40400332727 /* LangSwedishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangSwedishModel.cpp; sourceTree = "<group>"; };
+		F76BEF0A1F46F40400332727 /* LangThaiModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangThaiModel.cpp; sourceTree = "<group>"; };
+		F76BEF0B1F46F40400332727 /* LangTurkishModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangTurkishModel.cpp; sourceTree = "<group>"; };
+		F76BEF0C1F46F40400332727 /* LangVietnameseModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LangVietnameseModel.cpp; sourceTree = "<group>"; };
+		F76BEF0D1F46F40400332727 /* nsBig5Prober.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsBig5Prober.cpp; sourceTree = "<group>"; };
+		F76BEF0E1F46F40400332727 /* nsBig5Prober.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsBig5Prober.h; sourceTree = "<group>"; };
+		F76BEF0F1F46F40400332727 /* nsCharSetProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsCharSetProber.cpp; sourceTree = "<group>"; };
+		F76BEF101F46F40400332727 /* nsCharSetProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsCharSetProber.h; sourceTree = "<group>"; };
+		F76BEF111F46F40400332727 /* nsCodingStateMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsCodingStateMachine.h; sourceTree = "<group>"; };
+		F76BEF121F46F40400332727 /* nscore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nscore.h; sourceTree = "<group>"; };
+		F76BEF131F46F40400332727 /* nsEscCharsetProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEscCharsetProber.cpp; sourceTree = "<group>"; };
+		F76BEF141F46F40400332727 /* nsEscCharsetProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsEscCharsetProber.h; sourceTree = "<group>"; };
+		F76BEF151F46F40400332727 /* nsEscSM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEscSM.cpp; sourceTree = "<group>"; };
+		F76BEF161F46F40400332727 /* nsEUCJPProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEUCJPProber.cpp; sourceTree = "<group>"; };
+		F76BEF171F46F40400332727 /* nsEUCJPProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsEUCJPProber.h; sourceTree = "<group>"; };
+		F76BEF181F46F40400332727 /* nsEUCKRProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEUCKRProber.cpp; sourceTree = "<group>"; };
+		F76BEF191F46F40400332727 /* nsEUCKRProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsEUCKRProber.h; sourceTree = "<group>"; };
+		F76BEF1A1F46F40400332727 /* nsEUCTWProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsEUCTWProber.cpp; sourceTree = "<group>"; };
+		F76BEF1B1F46F40400332727 /* nsEUCTWProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsEUCTWProber.h; sourceTree = "<group>"; };
+		F76BEF1C1F46F40400332727 /* nsGB2312Prober.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsGB2312Prober.cpp; sourceTree = "<group>"; };
+		F76BEF1D1F46F40400332727 /* nsGB2312Prober.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsGB2312Prober.h; sourceTree = "<group>"; };
+		F76BEF1E1F46F40400332727 /* nsHebrewProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsHebrewProber.cpp; sourceTree = "<group>"; };
+		F76BEF1F1F46F40400332727 /* nsHebrewProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsHebrewProber.h; sourceTree = "<group>"; };
+		F76BEF201F46F40400332727 /* nsLatin1Prober.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsLatin1Prober.cpp; sourceTree = "<group>"; };
+		F76BEF211F46F40400332727 /* nsLatin1Prober.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsLatin1Prober.h; sourceTree = "<group>"; };
+		F76BEF221F46F40400332727 /* nsMBCSGroupProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsMBCSGroupProber.cpp; sourceTree = "<group>"; };
+		F76BEF231F46F40400332727 /* nsMBCSGroupProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsMBCSGroupProber.h; sourceTree = "<group>"; };
+		F76BEF241F46F40400332727 /* nsMBCSSM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsMBCSSM.cpp; sourceTree = "<group>"; };
+		F76BEF251F46F40400332727 /* nsPkgInt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsPkgInt.h; sourceTree = "<group>"; };
+		F76BEF261F46F40400332727 /* nsSBCharSetProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsSBCharSetProber.cpp; sourceTree = "<group>"; };
+		F76BEF271F46F40400332727 /* nsSBCharSetProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsSBCharSetProber.h; sourceTree = "<group>"; };
+		F76BEF281F46F40400332727 /* nsSBCSGroupProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsSBCSGroupProber.cpp; sourceTree = "<group>"; };
+		F76BEF291F46F40400332727 /* nsSBCSGroupProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsSBCSGroupProber.h; sourceTree = "<group>"; };
+		F76BEF2A1F46F40400332727 /* nsSJISProber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsSJISProber.cpp; sourceTree = "<group>"; };
+		F76BEF2B1F46F40400332727 /* nsSJISProber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsSJISProber.h; sourceTree = "<group>"; };
+		F76BEF2C1F46F40400332727 /* nsUniversalDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsUniversalDetector.cpp; sourceTree = "<group>"; };
+		F76BEF2D1F46F40400332727 /* nsUniversalDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsUniversalDetector.h; sourceTree = "<group>"; };
+		F76BEF2E1F46F40400332727 /* nsUTF8Prober.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nsUTF8Prober.cpp; sourceTree = "<group>"; };
+		F76BEF2F1F46F40400332727 /* nsUTF8Prober.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nsUTF8Prober.h; sourceTree = "<group>"; };
+		F76BEF301F46F40400332727 /* prmem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prmem.h; sourceTree = "<group>"; };
+		F76BEF311F46F40400332727 /* symbols.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = symbols.cmake; sourceTree = "<group>"; };
+		F76BEF321F46F40400332727 /* uchardet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = uchardet.cpp; sourceTree = "<group>"; };
+		F76BEF331F46F40400332727 /* uchardet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uchardet.h; sourceTree = "<group>"; };
 		F76C3B831C6388BC00DC4301 /* CCGraphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGraphics.h; sourceTree = "<group>"; };
 		F76C3B841C6388BC00DC4301 /* CCGraphics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCGraphics.m; sourceTree = "<group>"; };
 		F76C3B871C638A4C00DC4301 /* CCError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCError.h; sourceTree = "<group>"; };
@@ -3012,80 +3042,95 @@
 			path = iRate;
 			sourceTree = "<group>";
 		};
-		F76BEE731F46E74000332727 /* src */ = {
+		F76BEEE41F46F40400332727 /* src */ = {
 			isa = PBXGroup;
 			children = (
-				F76BEE741F46E74000332727 /* Big5Freq.tab */,
-				F76BEE751F46E74000332727 /* CharDistribution.cpp */,
-				F76BEE761F46E74000332727 /* CharDistribution.h */,
-				F76BEE771F46E74000332727 /* CMakeLists.txt */,
-				F76BEE781F46E74000332727 /* EUCKRFreq.tab */,
-				F76BEE791F46E74000332727 /* EUCTWFreq.tab */,
-				F76BEE7A1F46E74000332727 /* GB2312Freq.tab */,
-				F76BEE7B1F46E74000332727 /* JISFreq.tab */,
-				F76BEE7C1F46E74000332727 /* JpCntx.cpp */,
-				F76BEE7D1F46E74000332727 /* JpCntx.h */,
-				F76BEE7E1F46E74000332727 /* LangModels */,
-				F76BEE8D1F46E74000332727 /* nsBig5Prober.cpp */,
-				F76BEE8E1F46E74000332727 /* nsBig5Prober.h */,
-				F76BEE8F1F46E74000332727 /* nsCharSetProber.cpp */,
-				F76BEE901F46E74000332727 /* nsCharSetProber.h */,
-				F76BEE911F46E74000332727 /* nsCodingStateMachine.h */,
-				F76BEE921F46E74000332727 /* nscore.h */,
-				F76BEE931F46E74000332727 /* nsEscCharsetProber.cpp */,
-				F76BEE941F46E74000332727 /* nsEscCharsetProber.h */,
-				F76BEE951F46E74000332727 /* nsEscSM.cpp */,
-				F76BEE961F46E74000332727 /* nsEUCJPProber.cpp */,
-				F76BEE971F46E74000332727 /* nsEUCJPProber.h */,
-				F76BEE981F46E74000332727 /* nsEUCKRProber.cpp */,
-				F76BEE991F46E74000332727 /* nsEUCKRProber.h */,
-				F76BEE9A1F46E74000332727 /* nsEUCTWProber.cpp */,
-				F76BEE9B1F46E74000332727 /* nsEUCTWProber.h */,
-				F76BEE9C1F46E74000332727 /* nsGB2312Prober.cpp */,
-				F76BEE9D1F46E74000332727 /* nsGB2312Prober.h */,
-				F76BEE9E1F46E74000332727 /* nsHebrewProber.cpp */,
-				F76BEE9F1F46E74000332727 /* nsHebrewProber.h */,
-				F76BEEA01F46E74000332727 /* nsLatin1Prober.cpp */,
-				F76BEEA11F46E74000332727 /* nsLatin1Prober.h */,
-				F76BEEA21F46E74000332727 /* nsMBCSGroupProber.cpp */,
-				F76BEEA31F46E74000332727 /* nsMBCSGroupProber.h */,
-				F76BEEA41F46E74000332727 /* nsMBCSSM.cpp */,
-				F76BEEA51F46E74000332727 /* nsPkgInt.h */,
-				F76BEEA61F46E74000332727 /* nsSBCharSetProber.cpp */,
-				F76BEEA71F46E74000332727 /* nsSBCharSetProber.h */,
-				F76BEEA81F46E74000332727 /* nsSBCSGroupProber.cpp */,
-				F76BEEA91F46E74000332727 /* nsSBCSGroupProber.h */,
-				F76BEEAA1F46E74000332727 /* nsSJISProber.cpp */,
-				F76BEEAB1F46E74000332727 /* nsSJISProber.h */,
-				F76BEEAC1F46E74000332727 /* nsUniversalDetector.cpp */,
-				F76BEEAD1F46E74000332727 /* nsUniversalDetector.h */,
-				F76BEEAE1F46E74000332727 /* nsUTF8Prober.cpp */,
-				F76BEEAF1F46E74000332727 /* nsUTF8Prober.h */,
-				F76BEEB01F46E74000332727 /* prmem.h */,
-				F76BEEB11F46E74000332727 /* symbols.cmake */,
-				F76BEEB51F46E74000332727 /* uchardet.cpp */,
-				F76BEEB61F46E74000332727 /* uchardet.h */,
+				F76BEEE51F46F40400332727 /* Big5Freq.tab */,
+				F76BEEE61F46F40400332727 /* CharDistribution.cpp */,
+				F76BEEE71F46F40400332727 /* CharDistribution.h */,
+				F76BEEE81F46F40400332727 /* CMakeLists.txt */,
+				F76BEEE91F46F40400332727 /* EUCKRFreq.tab */,
+				F76BEEEA1F46F40400332727 /* EUCTWFreq.tab */,
+				F76BEEEB1F46F40400332727 /* GB2312Freq.tab */,
+				F76BEEEC1F46F40400332727 /* JISFreq.tab */,
+				F76BEEED1F46F40400332727 /* JpCntx.cpp */,
+				F76BEEEE1F46F40400332727 /* JpCntx.h */,
+				F76BEEEF1F46F40400332727 /* LangModels */,
+				F76BEF0D1F46F40400332727 /* nsBig5Prober.cpp */,
+				F76BEF0E1F46F40400332727 /* nsBig5Prober.h */,
+				F76BEF0F1F46F40400332727 /* nsCharSetProber.cpp */,
+				F76BEF101F46F40400332727 /* nsCharSetProber.h */,
+				F76BEF111F46F40400332727 /* nsCodingStateMachine.h */,
+				F76BEF121F46F40400332727 /* nscore.h */,
+				F76BEF131F46F40400332727 /* nsEscCharsetProber.cpp */,
+				F76BEF141F46F40400332727 /* nsEscCharsetProber.h */,
+				F76BEF151F46F40400332727 /* nsEscSM.cpp */,
+				F76BEF161F46F40400332727 /* nsEUCJPProber.cpp */,
+				F76BEF171F46F40400332727 /* nsEUCJPProber.h */,
+				F76BEF181F46F40400332727 /* nsEUCKRProber.cpp */,
+				F76BEF191F46F40400332727 /* nsEUCKRProber.h */,
+				F76BEF1A1F46F40400332727 /* nsEUCTWProber.cpp */,
+				F76BEF1B1F46F40400332727 /* nsEUCTWProber.h */,
+				F76BEF1C1F46F40400332727 /* nsGB2312Prober.cpp */,
+				F76BEF1D1F46F40400332727 /* nsGB2312Prober.h */,
+				F76BEF1E1F46F40400332727 /* nsHebrewProber.cpp */,
+				F76BEF1F1F46F40400332727 /* nsHebrewProber.h */,
+				F76BEF201F46F40400332727 /* nsLatin1Prober.cpp */,
+				F76BEF211F46F40400332727 /* nsLatin1Prober.h */,
+				F76BEF221F46F40400332727 /* nsMBCSGroupProber.cpp */,
+				F76BEF231F46F40400332727 /* nsMBCSGroupProber.h */,
+				F76BEF241F46F40400332727 /* nsMBCSSM.cpp */,
+				F76BEF251F46F40400332727 /* nsPkgInt.h */,
+				F76BEF261F46F40400332727 /* nsSBCharSetProber.cpp */,
+				F76BEF271F46F40400332727 /* nsSBCharSetProber.h */,
+				F76BEF281F46F40400332727 /* nsSBCSGroupProber.cpp */,
+				F76BEF291F46F40400332727 /* nsSBCSGroupProber.h */,
+				F76BEF2A1F46F40400332727 /* nsSJISProber.cpp */,
+				F76BEF2B1F46F40400332727 /* nsSJISProber.h */,
+				F76BEF2C1F46F40400332727 /* nsUniversalDetector.cpp */,
+				F76BEF2D1F46F40400332727 /* nsUniversalDetector.h */,
+				F76BEF2E1F46F40400332727 /* nsUTF8Prober.cpp */,
+				F76BEF2F1F46F40400332727 /* nsUTF8Prober.h */,
+				F76BEF301F46F40400332727 /* prmem.h */,
+				F76BEF311F46F40400332727 /* symbols.cmake */,
+				F76BEF321F46F40400332727 /* uchardet.cpp */,
+				F76BEF331F46F40400332727 /* uchardet.h */,
 			);
 			path = src;
 			sourceTree = "<group>";
 		};
-		F76BEE7E1F46E74000332727 /* LangModels */ = {
+		F76BEEEF1F46F40400332727 /* LangModels */ = {
 			isa = PBXGroup;
 			children = (
-				F76BEE7F1F46E74000332727 /* LangArabicModel.cpp */,
-				F76BEE801F46E74000332727 /* LangBulgarianModel.cpp */,
-				F76BEE811F46E74000332727 /* LangDanishModel.cpp */,
-				F76BEE821F46E74000332727 /* LangEsperantoModel.cpp */,
-				F76BEE831F46E74000332727 /* LangFrenchModel.cpp */,
-				F76BEE841F46E74000332727 /* LangGermanModel.cpp */,
-				F76BEE851F46E74000332727 /* LangGreekModel.cpp */,
-				F76BEE861F46E74000332727 /* LangHebrewModel.cpp */,
-				F76BEE871F46E74000332727 /* LangHungarianModel.cpp */,
-				F76BEE881F46E74000332727 /* LangRussianModel.cpp */,
-				F76BEE891F46E74000332727 /* LangSpanishModel.cpp */,
-				F76BEE8A1F46E74000332727 /* LangThaiModel.cpp */,
-				F76BEE8B1F46E74000332727 /* LangTurkishModel.cpp */,
-				F76BEE8C1F46E74000332727 /* LangVietnameseModel.cpp */,
+				F76BEEF01F46F40400332727 /* LangArabicModel.cpp */,
+				F76BEEF11F46F40400332727 /* LangBulgarianModel.cpp */,
+				F76BEEF21F46F40400332727 /* LangCroatianModel.cpp */,
+				F76BEEF31F46F40400332727 /* LangCzechModel.cpp */,
+				F76BEEF41F46F40400332727 /* LangDanishModel.cpp */,
+				F76BEEF51F46F40400332727 /* LangEsperantoModel.cpp */,
+				F76BEEF61F46F40400332727 /* LangEstonianModel.cpp */,
+				F76BEEF71F46F40400332727 /* LangFinnishModel.cpp */,
+				F76BEEF81F46F40400332727 /* LangFrenchModel.cpp */,
+				F76BEEF91F46F40400332727 /* LangGermanModel.cpp */,
+				F76BEEFA1F46F40400332727 /* LangGreekModel.cpp */,
+				F76BEEFB1F46F40400332727 /* LangHebrewModel.cpp */,
+				F76BEEFC1F46F40400332727 /* LangHungarianModel.cpp */,
+				F76BEEFD1F46F40400332727 /* LangIrishModel.cpp */,
+				F76BEEFE1F46F40400332727 /* LangItalianModel.cpp */,
+				F76BEEFF1F46F40400332727 /* LangLatvianModel.cpp */,
+				F76BEF001F46F40400332727 /* LangLithuanianModel.cpp */,
+				F76BEF011F46F40400332727 /* LangMalteseModel.cpp */,
+				F76BEF021F46F40400332727 /* LangPolishModel.cpp */,
+				F76BEF031F46F40400332727 /* LangPortugueseModel.cpp */,
+				F76BEF041F46F40400332727 /* LangRomanianModel.cpp */,
+				F76BEF051F46F40400332727 /* LangRussianModel.cpp */,
+				F76BEF061F46F40400332727 /* LangSlovakModel.cpp */,
+				F76BEF071F46F40400332727 /* LangSloveneModel.cpp */,
+				F76BEF081F46F40400332727 /* LangSpanishModel.cpp */,
+				F76BEF091F46F40400332727 /* LangSwedishModel.cpp */,
+				F76BEF0A1F46F40400332727 /* LangThaiModel.cpp */,
+				F76BEF0B1F46F40400332727 /* LangTurkishModel.cpp */,
+				F76BEF0C1F46F40400332727 /* LangVietnameseModel.cpp */,
 			);
 			path = LangModels;
 			sourceTree = "<group>";
@@ -3240,7 +3285,7 @@
 		F7B4F1C51F44356F00B53B42 /* NCUchardet */ = {
 			isa = PBXGroup;
 			children = (
-				F76BEE731F46E74000332727 /* src */,
+				F76BEEE41F46F40400332727 /* src */,
 				F7B4F1C71F44356F00B53B42 /* NCUchardet.h */,
 				F7B4F1C81F44356F00B53B42 /* NCUchardet.m */,
 			);
@@ -4242,7 +4287,7 @@
 				F7D4233D1F0596AC009C9782 /* Reader-Button-N@3x.png in Resources */,
 				F7D424B61F063B82009C9782 /* ZSSundo.png in Resources */,
 				F7D424A91F063B82009C9782 /* ZSSrightjustify@2x.png in Resources */,
-				F76BEEBB1F46E74000332727 /* EUCTWFreq.tab in Resources */,
+				F76BEF381F46F40400332727 /* EUCTWFreq.tab in Resources */,
 				F700222C1EC479840080073F /* Custom.xcassets in Resources */,
 				F77B0EFE1D118A16002130FE /* CCUploadFromOtherUpp.storyboard in Resources */,
 				F7D4246E1F063B82009C9782 /* CTAssetsPickerController.bundle in Resources */,
@@ -4261,7 +4306,7 @@
 				F77B0F0E1D118A16002130FE /* BKPasscodeView.strings in Resources */,
 				F7D4248D1F063B82009C9782 /* ZSShorizontalrule@2x.png in Resources */,
 				F7D424AF1F063B82009C9782 /* ZSSsuperscript@2x.png in Resources */,
-				F76BEEB71F46E74000332727 /* Big5Freq.tab in Resources */,
+				F76BEF341F46F40400332727 /* Big5Freq.tab in Resources */,
 				F7D424A71F063B82009C9782 /* ZSSredo@2x.png in Resources */,
 				F7D4233B1F0596AC009C9782 /* Reader-Button-N.png in Resources */,
 				F7D424A51F063B82009C9782 /* ZSSquicklink@2x.png in Resources */,
@@ -4334,7 +4379,7 @@
 				F7D424B31F063B82009C9782 /* ZSStextcolor@2x.png in Resources */,
 				F7D4249D1F063B82009C9782 /* ZSSorderedlist@2x.png in Resources */,
 				F7F54CEE1E5B14C700E19C62 /* ImageSelectedSmallOff.png in Resources */,
-				F76BEEBC1F46E74000332727 /* GB2312Freq.tab in Resources */,
+				F76BEF391F46F40400332727 /* GB2312Freq.tab in Resources */,
 				F7F54D051E5B14C800E19C62 /* VideoOverlay@3x.png in Resources */,
 				F7D424A11F063B82009C9782 /* ZSSparagraph@2x.png in Resources */,
 				F7F54D011E5B14C700E19C62 /* UIBarButtonItemGrid@2x.png in Resources */,
@@ -4366,10 +4411,10 @@
 				F7D424A61F063B82009C9782 /* ZSSredo.png in Resources */,
 				F7F54CF01E5B14C700E19C62 /* ImageSelectedSmallOff@3x.png in Resources */,
 				F7D424771F063B82009C9782 /* ZSSbgcolor@2x.png in Resources */,
-				F76BEEB91F46E74000332727 /* CMakeLists.txt in Resources */,
+				F76BEF361F46F40400332727 /* CMakeLists.txt in Resources */,
 				F7F54CEC1E5B14C700E19C62 /* ImageSelectedOn@2x.png in Resources */,
 				F7D424951F063B82009C9782 /* ZSSitalic@2x.png in Resources */,
-				F76BEEDE1F46E74000332727 /* symbols.cmake in Resources */,
+				F76BEF6A1F46F40400332727 /* symbols.cmake in Resources */,
 				F7D424B41F063B82009C9782 /* ZSSunderline.png in Resources */,
 				F7D424831F063B82009C9782 /* ZSSh2@2x.png in Resources */,
 				F7F54CF21E5B14C700E19C62 /* ImageSelectedSmallOn@2x.png in Resources */,
@@ -4396,13 +4441,13 @@
 				F7F54CE91E5B14C700E19C62 /* ImageSelectedOff@2x.png in Resources */,
 				F77B0F8A1D118A16002130FE /* CCCellMain.xib in Resources */,
 				F77B0F8C1D118A16002130FE /* CCCellMainTransfer.xib in Resources */,
-				F76BEEBD1F46E74000332727 /* JISFreq.tab in Resources */,
+				F76BEF3A1F46F40400332727 /* JISFreq.tab in Resources */,
 				F7D4249A1F063B82009C9782 /* ZSSlink.png in Resources */,
 				F7D4247A1F063B82009C9782 /* ZSScenterjustify.png in Resources */,
 				F7D423451F0596AC009C9782 /* Reader-Mark-N@2x.png in Resources */,
 				F7D423481F0596AC009C9782 /* Reader-Mark-Y@2x.png in Resources */,
 				F7D4233F1F0596AC009C9782 /* Reader-Email@2x.png in Resources */,
-				F76BEEBA1F46E74000332727 /* EUCKRFreq.tab in Resources */,
+				F76BEF371F46F40400332727 /* EUCKRFreq.tab in Resources */,
 				F75797AE1E81356C00187A1B /* CTAssetsPicker.strings in Resources */,
 				F7D424BC1F063B82009C9782 /* ZSSviewsource.png in Resources */,
 				F762CB961EACB84400B38484 /* icon-error@2x.png in Resources */,
@@ -4731,6 +4776,7 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				F76BEF4F1F46F40400332727 /* LangPortugueseModel.cpp in Sources */,
 				F762CBBE1EACB89C00B38484 /* LMMediaItemQueueManager.m in Sources */,
 				F70022D71EC4C9100080073F /* NSDate+RFC1123.m in Sources */,
 				F7D424671F063B82009C9782 /* CTAssetsGridViewController.m in Sources */,
@@ -4738,31 +4784,30 @@
 				F7D424CA1F063B82009C9782 /* ZSSRichTextEditor.m in Sources */,
 				F70022A41EC4C9100080073F /* AFNetworkReachabilityManager.m in Sources */,
 				F762CAFD1EACB66200B38484 /* XLFormInlineSelectorCell.m in Sources */,
+				F76BEF541F46F40400332727 /* LangSpanishModel.cpp in Sources */,
 				F77B0DF21D118A16002130FE /* CCUploadFromOtherUpp.m in Sources */,
+				F76BEF3F1F46F40400332727 /* LangCzechModel.cpp in Sources */,
+				F76BEF691F46F40400332727 /* nsUTF8Prober.cpp in Sources */,
 				F77B0DF41D118A16002130FE /* CCMain.m in Sources */,
-				F76BEED61F46E74000332727 /* nsLatin1Prober.cpp in Sources */,
 				F77B0DF51D118A16002130FE /* CCUtility.m in Sources */,
 				F762CB071EACB66200B38484 /* XLFormOptionsObject.m in Sources */,
 				F7C525A01E3B48B700FFE02C /* CCNotification.swift in Sources */,
+				F76BEF601F46F40400332727 /* nsGB2312Prober.cpp in Sources */,
 				F77B0DFB1D118A16002130FE /* NYXProgressiveImageView.m in Sources */,
 				F7F54D0E1E5B14C800E19C62 /* UIImage+MWPhotoBrowser.m in Sources */,
 				F7F54D091E5B14C800E19C62 /* MWPhoto.m in Sources */,
-				F76BEECD1F46E74000332727 /* nsBig5Prober.cpp in Sources */,
-				F76BEEB81F46E74000332727 /* CharDistribution.cpp in Sources */,
+				F76BEF351F46F40400332727 /* CharDistribution.cpp in Sources */,
 				F7B0C0CD1EE7E7750033AC24 /* CCSynchronize.m in Sources */,
 				F77B0DFF1D118A16002130FE /* OCNetworking.m in Sources */,
 				F77B0E011D118A16002130FE /* RNCryptor.m in Sources */,
-				F76BEED11F46E74000332727 /* nsEUCJPProber.cpp in Sources */,
 				F70022DA1EC4C9100080073F /* OCHTTPRequestOperation.m in Sources */,
 				F7D4245C1F063B82009C9782 /* CTAssetCheckmark.m in Sources */,
 				F70022A11EC4C9100080073F /* AFHTTPSessionManager.m in Sources */,
 				F762CB041EACB66200B38484 /* XLFormSwitchCell.m in Sources */,
-				F76BEED81F46E74000332727 /* nsMBCSSM.cpp in Sources */,
 				F77B0E031D118A16002130FE /* CCShareInfoCMOC.m in Sources */,
 				F77B0E041D118A16002130FE /* UIImage+animatedGIF.m in Sources */,
 				F7D423881F0596C6009C9782 /* ReaderThumbView.m in Sources */,
 				F73CCE301DC13798007E38D8 /* UICKeyChainStore.m in Sources */,
-				F76BEEC71F46E74000332727 /* LangHungarianModel.cpp in Sources */,
 				F762CBBF1EACB89C00B38484 /* LMMediaItemStreamingCache.m in Sources */,
 				F7D4238A1F0596C6009C9782 /* ThumbsMainToolbar.m in Sources */,
 				F70022EC1EC4C9100080073F /* OCXMLSharedParser.m in Sources */,
@@ -4770,6 +4815,7 @@
 				F762CB001EACB66200B38484 /* XLFormSegmentedCell.m in Sources */,
 				F732BA061D76CE1500E9878B /* CCNetworking.m in Sources */,
 				F7BAADDD1ED5A87C00B7EAD4 /* TableDirectory+CoreDataProperties.m in Sources */,
+				F76BEF451F46F40400332727 /* LangGermanModel.cpp in Sources */,
 				F70022B01EC4C9100080073F /* AFURLSessionManager.m in Sources */,
 				F7B1FBC71E72E3D1001781FE /* SwiftWebVC.swift in Sources */,
 				F7DC5FEC1F011EB700A903C7 /* MGSwipeButton.m in Sources */,
@@ -4780,7 +4826,7 @@
 				F7D4237F1F0596C6009C9782 /* ReaderDocumentOutline.m in Sources */,
 				F73F537F1E929C8500F8678D /* CCMore.swift in Sources */,
 				F7D424621F063B82009C9782 /* CTAssetSelectionButton.m in Sources */,
-				F76BEEC01F46E74000332727 /* LangBulgarianModel.cpp in Sources */,
+				F76BEF3D1F46F40400332727 /* LangBulgarianModel.cpp in Sources */,
 				F7F54D0C1E5B14C800E19C62 /* MWTapDetectingView.m in Sources */,
 				F7D424631F063B82009C9782 /* CTAssetSelectionLabel.m in Sources */,
 				F77B0E121D118A16002130FE /* CCPatenteGuida.m in Sources */,
@@ -4793,30 +4839,30 @@
 				F750374F1DBFA91A008FB480 /* NSArray+PureLayout.m in Sources */,
 				F7A13A031E7F3D5D00016680 /* CCProgressView.m in Sources */,
 				F77B0E141D118A16002130FE /* CCError.m in Sources */,
-				F76BEEDC1F46E74000332727 /* nsUniversalDetector.cpp in Sources */,
 				F7B0C1751EE839A30033AC24 /* NCAutoUpload.m in Sources */,
 				F77B0E161D118A16002130FE /* AFViewShaker.m in Sources */,
 				F7D424C81F063B82009C9782 /* ZSSBarButtonItem.m in Sources */,
-				F76BEEDA1F46E74000332727 /* nsSBCSGroupProber.cpp in Sources */,
 				F7D424641F063B82009C9782 /* CTAssetsGridSelectedView.m in Sources */,
-				F76BEED21F46E74000332727 /* nsEUCKRProber.cpp in Sources */,
+				F76BEF551F46F40400332727 /* LangSwedishModel.cpp in Sources */,
 				F7D424711F063B82009C9782 /* CTAssetsViewControllerTransition.m in Sources */,
 				F762CB021EACB66200B38484 /* XLFormSliderCell.m in Sources */,
 				F77B0E1B1D118A16002130FE /* CCGraphics.m in Sources */,
 				F70022CB1EC4C9100080073F /* OCSharedDto.m in Sources */,
 				F762CB111EACB66200B38484 /* NSString+XLFormAdditions.m in Sources */,
+				F76BEF681F46F40400332727 /* nsUniversalDetector.cpp in Sources */,
 				F762CB9B1EACB84400B38484 /* TWMessageBarManager.m in Sources */,
 				F7D423871F0596C6009C9782 /* ReaderThumbsView.m in Sources */,
+				F76BEF4A1F46F40400332727 /* LangItalianModel.cpp in Sources */,
 				F77B0E201D118A16002130FE /* CCShareUserOC.m in Sources */,
 				F7B1FBCA1E72E3D1001781FE /* SwiftWebVCActivitySafari.swift in Sources */,
+				F76BEF431F46F40400332727 /* LangFinnishModel.cpp in Sources */,
 				F7F54D0A1E5B14C800E19C62 /* MWPhotoBrowser.m in Sources */,
-				F76BEEE11F46E74000332727 /* uchardet.cpp in Sources */,
 				F720E01F1E48C73E001A4B9E /* CCActions.swift in Sources */,
 				F762CB081EACB66200B38484 /* XLFormOptionsViewController.m in Sources */,
 				F73CC0721E813DFF006E3047 /* BKPasscodeLockScreenManager.m in Sources */,
-				F76BEED91F46E74000332727 /* nsSBCharSetProber.cpp in Sources */,
+				F76BEF571F46F40400332727 /* LangTurkishModel.cpp in Sources */,
 				F762CB0E1EACB66200B38484 /* NSExpression+XLFormAdditions.m in Sources */,
-				F76BEED01F46E74000332727 /* nsEscSM.cpp in Sources */,
+				F76BEF591F46F40400332727 /* nsBig5Prober.cpp in Sources */,
 				F77B0E221D118A16002130FE /* CCManageLocation.m in Sources */,
 				F70022C51EC4C9100080073F /* OCNotificationsAction.m in Sources */,
 				F77B0E231D118A16002130FE /* CCSharePermissionOC.m in Sources */,
@@ -4826,18 +4872,18 @@
 				F75AE3C71E9D12900088BB09 /* SwiftyAvatar.swift in Sources */,
 				F762CAFC1EACB66200B38484 /* XLFormImageCell.m in Sources */,
 				F70022D11EC4C9100080073F /* OCUserProfile.m in Sources */,
-				F76BEEBF1F46E74000332727 /* LangArabicModel.cpp in Sources */,
-				F76BEED41F46E74000332727 /* nsGB2312Prober.cpp in Sources */,
+				F76BEF511F46F40400332727 /* LangRussianModel.cpp in Sources */,
+				F76BEF3C1F46F40400332727 /* LangArabicModel.cpp in Sources */,
 				F762CAFE1EACB66200B38484 /* XLFormLeftRightSelectorCell.m in Sources */,
 				F77B0E301D118A16002130FE /* CCHud.m in Sources */,
 				F7D423891F0596C6009C9782 /* ReaderViewController.m in Sources */,
 				F70022E91EC4C9100080073F /* OCXMLShareByLinkParser.m in Sources */,
 				F7D4246C1F063B82009C9782 /* CTAssetsPageViewController.m in Sources */,
+				F76BEF471F46F40400332727 /* LangHebrewModel.cpp in Sources */,
 				F7D424601F063B82009C9782 /* CTAssetPlayButton.m in Sources */,
 				F70022E31EC4C9100080073F /* OCXMLParser.m in Sources */,
 				F77B0E311D118A16002130FE /* CCExifGeo.m in Sources */,
 				F7D4246B1F063B82009C9782 /* CTAssetsPageView.m in Sources */,
-				F76BEED71F46E74000332727 /* nsMBCSGroupProber.cpp in Sources */,
 				F78964AE1EBB576C00403E13 /* JDStatusBarStyle.m in Sources */,
 				F7D424C11F063B82009C9782 /* CYRToken.m in Sources */,
 				F7BAADD71ED5A87C00B7EAD4 /* TableCertificates+CoreDataProperties.m in Sources */,
@@ -4850,8 +4896,8 @@
 				F77B0E391D118A16002130FE /* CCContoCorrente.m in Sources */,
 				F77B0E3A1D118A16002130FE /* RNCryptorEngine.m in Sources */,
 				F7D424CB1F063B82009C9782 /* ZSSTextView.m in Sources */,
-				F76BEEDB1F46E74000332727 /* nsSJISProber.cpp in Sources */,
 				F77B0E3C1D118A16002130FE /* CCCartaIdentita.m in Sources */,
+				F76BEF6B1F46F40400332727 /* uchardet.cpp in Sources */,
 				F7BAADD41ED5A87C00B7EAD4 /* TableCertificates+CoreDataClass.m in Sources */,
 				F762CAFF1EACB66200B38484 /* XLFormPickerCell.m in Sources */,
 				F7A321AD1E9E6AD50069AD1B /* CCAdvanced.m in Sources */,
@@ -4859,6 +4905,7 @@
 				F77B0E411D118A16002130FE /* CCSplit.m in Sources */,
 				F77B0E481D118A16002130FE /* CCCrypto.m in Sources */,
 				F7D4245F1F063B82009C9782 /* CTAssetItemViewController.m in Sources */,
+				F76BEF561F46F40400332727 /* LangThaiModel.cpp in Sources */,
 				F73CC0781E813DFF006E3047 /* BKShiftingView.m in Sources */,
 				F77B0E491D118A16002130FE /* UIImage+Saving.m in Sources */,
 				F7A3218C1E9E42B30069AD1B /* CCMenuAccount.m in Sources */,
@@ -4877,15 +4924,12 @@
 				F762CB171EACB66200B38484 /* XLFormRegexValidator.m in Sources */,
 				F73CC0691E813DFF006E3047 /* BKPasscodeDummyViewController.m in Sources */,
 				F762CB1A1EACB66200B38484 /* XLForm.m in Sources */,
-				F76BEEC51F46E74000332727 /* LangGreekModel.cpp in Sources */,
 				F762CB051EACB66200B38484 /* XLFormTextFieldCell.m in Sources */,
 				F7B4F1CB1F44356F00B53B42 /* NCUchardet.m in Sources */,
-				F76BEEC41F46E74000332727 /* LangGermanModel.cpp in Sources */,
+				F76BEF5C1F46F40400332727 /* nsEscSM.cpp in Sources */,
 				F77B0E5B1D118A16002130FE /* UIImage+Rotating.m in Sources */,
-				F76BEECF1F46E74000332727 /* nsEscCharsetProber.cpp in Sources */,
 				F7A321561E9E2A070069AD1B /* CCFavoritesCell.m in Sources */,
 				F7D4237D1F0596C6009C9782 /* ReaderContentView.m in Sources */,
-				F76BEEC31F46E74000332727 /* LangFrenchModel.cpp in Sources */,
 				F7D4245D1F063B82009C9782 /* CTAssetCollectionViewCell.m in Sources */,
 				F7D4245E1F063B82009C9782 /* CTAssetCollectionViewController.m in Sources */,
 				F762CAF91EACB66200B38484 /* XLFormCheckCell.m in Sources */,
@@ -4896,23 +4940,27 @@
 				F7D424691F063B82009C9782 /* CTAssetsGridViewLayout.m in Sources */,
 				F7D4237E1F0596C6009C9782 /* ReaderDocument.m in Sources */,
 				F7D424661F063B82009C9782 /* CTAssetsGridViewCell.m in Sources */,
+				F76BEF5F1F46F40400332727 /* nsEUCTWProber.cpp in Sources */,
+				F76BEF5B1F46F40400332727 /* nsEscCharsetProber.cpp in Sources */,
 				F762CBBC1EACB89C00B38484 /* LMMediaPlayerHelper.m in Sources */,
 				F7659A291DC0B726004860C4 /* EAIntroView.m in Sources */,
 				F7D4237C1F0596C6009C9782 /* ReaderContentTile.m in Sources */,
 				F7D424581F063B82009C9782 /* PHAssetCollection+CTAssetsPickerController.m in Sources */,
 				F73CC07E1E813DFF006E3047 /* BKTouchIDSwitchView.m in Sources */,
+				F76BEF521F46F40400332727 /* LangSlovakModel.cpp in Sources */,
 				F77B0E5F1D118A16002130FE /* CCSettings.m in Sources */,
+				F76BEF631F46F40400332727 /* nsMBCSGroupProber.cpp in Sources */,
 				F7D424611F063B82009C9782 /* CTAssetScrollView.m in Sources */,
 				F762CB141EACB66200B38484 /* XLFormRightImageButton.m in Sources */,
 				F7B3A4EE1E97818A000DACE8 /* CCLoginWeb.swift in Sources */,
 				F73D71621F2673C200E233EB /* NCText.swift in Sources */,
+				F76BEF651F46F40400332727 /* nsSBCharSetProber.cpp in Sources */,
 				F77B0E631D118A16002130FE /* CCShareOC.m in Sources */,
-				F76BEEC11F46E74000332727 /* LangDanishModel.cpp in Sources */,
 				F73CCE261DC13788007E38D8 /* UIScrollView+EmptyDataSet.m in Sources */,
 				F7D4246F1F063B82009C9782 /* CTAssetsPickerController.m in Sources */,
 				F7F54D071E5B14C800E19C62 /* MWGridCell.m in Sources */,
 				F77B0E661D118A16002130FE /* NSString+Base64.m in Sources */,
-				F76BEECE1F46E74000332727 /* nsCharSetProber.cpp in Sources */,
+				F76BEF3E1F46F40400332727 /* LangCroatianModel.cpp in Sources */,
 				F77B0E671D118A16002130FE /* Reachability.m in Sources */,
 				F762CB121EACB66200B38484 /* UIView+XLFormAdditions.m in Sources */,
 				F73CC06F1E813DFF006E3047 /* BKPasscodeInputView.m in Sources */,
@@ -4920,12 +4968,14 @@
 				F77B0E6A1D118A16002130FE /* RNDecryptor.m in Sources */,
 				F73CC0751E813DFF006E3047 /* BKPasscodeViewController.m in Sources */,
 				F750374D1DBFA91A008FB480 /* ALView+PureLayout.m in Sources */,
+				F76BEF5D1F46F40400332727 /* nsEUCJPProber.cpp in Sources */,
 				F7F6AC4E1E525AD300E8EB45 /* CCManageCryptoCloud.m in Sources */,
 				F77B0E731D118A16002130FE /* PPImageScrollingTableViewCell.m in Sources */,
 				F762CBBD1EACB89C00B38484 /* LMMediaItem.m in Sources */,
 				F7659A2E1DC0B72F004860C4 /* EARestrictedScrollView.m in Sources */,
 				F7D423861F0596C6009C9782 /* ReaderThumbRequest.m in Sources */,
-				F76BEEBE1F46E74000332727 /* JpCntx.cpp in Sources */,
+				F76BEF411F46F40400332727 /* LangEsperantoModel.cpp in Sources */,
+				F76BEF3B1F46F40400332727 /* JpCntx.cpp in Sources */,
 				F77B0E741D118A16002130FE /* CCBancomat.m in Sources */,
 				F77B0E7B1D118A16002130FE /* CCPassaporto.m in Sources */,
 				F7D4246A1F063B82009C9782 /* CTAssetsNavigationController.m in Sources */,
@@ -4933,15 +4983,18 @@
 				F76B3CCE1EAE01BD00921AC9 /* NCBrand.swift in Sources */,
 				F7B1FBC91E72E3D1001781FE /* SwiftWebVCActivityChrome.swift in Sources */,
 				F762CB8A1EACB81000B38484 /* REMenuItemView.m in Sources */,
+				F76BEF401F46F40400332727 /* LangDanishModel.cpp in Sources */,
 				F7BF1B431D51E893000854F6 /* CCLogin.m in Sources */,
 				F70022FB1EC4C9100080073F /* NSString+Encode.m in Sources */,
+				F76BEF481F46F40400332727 /* LangHungarianModel.cpp in Sources */,
+				F76BEF5A1F46F40400332727 /* nsCharSetProber.cpp in Sources */,
 				F75037511DBFA91A008FB480 /* NSLayoutConstraint+PureLayout.m in Sources */,
 				F762CAFA1EACB66200B38484 /* XLFormDateCell.m in Sources */,
 				F77B0E871D118A16002130FE /* NSData+Base64.m in Sources */,
 				F77B0E8A1D118A16002130FE /* CCCartaDiCredito.m in Sources */,
 				F70022B91EC4C9100080073F /* OCCommunication.m in Sources */,
 				F762CB181EACB66200B38484 /* XLFormValidationStatus.m in Sources */,
-				F76BEEC21F46E74000332727 /* LangEsperantoModel.cpp in Sources */,
+				F76BEF421F46F40400332727 /* LangEstonianModel.cpp in Sources */,
 				F77B0E8F1D118A16002130FE /* CCSection.m in Sources */,
 				F72AAECB1E5C60C700BB17E1 /* AHKActionSheetViewController.m in Sources */,
 				F77B0E911D118A16002130FE /* CCTemplates.m in Sources */,
@@ -4957,19 +5010,19 @@
 				F70022AD1EC4C9100080073F /* AFURLResponseSerialization.m in Sources */,
 				F7D424531F063B82009C9782 /* NSBundle+CTAssetsPickerController.m in Sources */,
 				F77B0E9B1D118A16002130FE /* CCBKPasscode.m in Sources */,
+				F76BEF461F46F40400332727 /* LangGreekModel.cpp in Sources */,
 				F7659A271DC0B726004860C4 /* EAIntroPage.m in Sources */,
+				F76BEF661F46F40400332727 /* nsSBCSGroupProber.cpp in Sources */,
 				F7169A1D1EE590930086BD69 /* NCSharesCell.m in Sources */,
 				F77B0EA61D118A16002130FE /* NSString+TruncateToWidth.m in Sources */,
 				F7D424651F063B82009C9782 /* CTAssetsGridView.m in Sources */,
 				F78088EA1DD3A1DB005C5A7C /* cryptocloud.xcdatamodeld in Sources */,
 				F70022C21EC4C9100080073F /* OCNotifications.m in Sources */,
 				F70022BF1EC4C9100080073F /* OCFileDto.m in Sources */,
-				F76BEECA1F46E74000332727 /* LangThaiModel.cpp in Sources */,
 				F7A13A041E7F3D5D00016680 /* UINavigationController+CCProgress.m in Sources */,
 				F73C002F1E55D7DF00EEEFA7 /* CCManageCryptoCloudSecurity.m in Sources */,
 				F70022DD1EC4C9100080073F /* OCWebDAVClient.m in Sources */,
 				F7D424C41F063B82009C9782 /* HRColorCursor.m in Sources */,
-				F76BEEC91F46E74000332727 /* LangSpanishModel.cpp in Sources */,
 				F77B0EAD1D118A16002130FE /* CCGlobal.m in Sources */,
 				F70022BC1EC4C9100080073F /* OCExternalSites.m in Sources */,
 				F73CC07B1E813DFF006E3047 /* BKTouchIDManager.m in Sources */,
@@ -4990,23 +5043,25 @@
 				F7D4238C1F0596C6009C9782 /* UIXToolbarView.m in Sources */,
 				F77B0EB81D118A16002130FE /* CCAccountWeb.m in Sources */,
 				F7A321791E9E3EAF0069AD1B /* CCTransfers.m in Sources */,
-				F76BEED51F46E74000332727 /* nsHebrewProber.cpp in Sources */,
 				F762CBC11EACB89C00B38484 /* LMMediaPlayerView.m in Sources */,
+				F76BEF441F46F40400332727 /* LangFrenchModel.cpp in Sources */,
+				F76BEF531F46F40400332727 /* LangSloveneModel.cpp in Sources */,
+				F76BEF4B1F46F40400332727 /* LangLatvianModel.cpp in Sources */,
 				F762CAFB1EACB66200B38484 /* XLFormDatePickerCell.m in Sources */,
 				F762CB0F1EACB66200B38484 /* NSObject+XLFormAdditions.m in Sources */,
 				F762CB891EACB81000B38484 /* REMenuItem.m in Sources */,
+				F76BEF611F46F40400332727 /* nsHebrewProber.cpp in Sources */,
 				F762CBBB1EACB89C00B38484 /* NSArray+LMMediaPlayerShuffle.m in Sources */,
+				F76BEF4C1F46F40400332727 /* LangLithuanianModel.cpp in Sources */,
 				F7D423791F0596C6009C9782 /* CGPDFDocument.m in Sources */,
-				F76BEEC81F46E74000332727 /* LangRussianModel.cpp in Sources */,
+				F76BEF641F46F40400332727 /* nsMBCSSM.cpp in Sources */,
 				F7BAADFF1ED5B2A500B7EAD4 /* TableLocalFile+CoreDataClass.m in Sources */,
 				F7BAADCB1ED5A87C00B7EAD4 /* NCManageDatabase.swift in Sources */,
 				F7D424551F063B82009C9782 /* NSIndexSet+CTAssetsPickerController.m in Sources */,
 				F7BAADDA1ED5A87C00B7EAD4 /* TableDirectory+CoreDataClass.m in Sources */,
 				F7A321551E9E2A070069AD1B /* CCFavorites.m in Sources */,
 				F7BAADE01ED5A87C00B7EAD4 /* TableLocalFile+CoreDataProperties.m in Sources */,
-				F76BEECC1F46E74000332727 /* LangVietnameseModel.cpp in Sources */,
 				F77B0EBE1D118A16002130FE /* CCNote.m in Sources */,
-				F76BEECB1F46E74000332727 /* LangTurkishModel.cpp in Sources */,
 				F7F54D0B1E5B14C800E19C62 /* MWTapDetectingImageView.m in Sources */,
 				F77B0EBF1D118A16002130FE /* RNEncryptor.m in Sources */,
 				F7D423821F0596C6009C9782 /* ReaderThumbCache.m in Sources */,
@@ -5018,6 +5073,7 @@
 				F7169A1C1EE590930086BD69 /* NCShares.m in Sources */,
 				F77B0EC31D118A16002130FE /* UIImage+Enhancing.m in Sources */,
 				F77B0EC61D118A16002130FE /* CCCellMain.m in Sources */,
+				F76BEF4D1F46F40400332727 /* LangMalteseModel.cpp in Sources */,
 				F7DC5FED1F011EB700A903C7 /* MGSwipeTableCell.m in Sources */,
 				F7D424541F063B82009C9782 /* NSDateFormatter+CTAssetsPickerController.m in Sources */,
 				F7D4238B1F0596C6009C9782 /* ThumbsViewController.m in Sources */,
@@ -5026,34 +5082,38 @@
 				F7D423811F0596C6009C9782 /* ReaderMainToolbar.m in Sources */,
 				F762CB131EACB66200B38484 /* XLFormRightDetailCell.m in Sources */,
 				F7D4237B1F0596C6009C9782 /* ReaderContentPage.m in Sources */,
-				F76BEED31F46E74000332727 /* nsEUCTWProber.cpp in Sources */,
 				F762CB871EACB81000B38484 /* REMenu.m in Sources */,
 				F762CB091EACB66200B38484 /* XLFormViewController.m in Sources */,
 				F762CB161EACB66200B38484 /* XLFormTextView.m in Sources */,
 				F7D424681F063B82009C9782 /* CTAssetsGridViewFooter.m in Sources */,
 				F75AC2431F1F62450073EC19 /* NCManageAutoUploadFileName.swift in Sources */,
 				F7D424701F063B82009C9782 /* CTAssetsPickerNoAssetsView.m in Sources */,
+				F76BEF501F46F40400332727 /* LangRomanianModel.cpp in Sources */,
 				F7D424591F063B82009C9782 /* PHImageManager+CTAssetsPickerController.m in Sources */,
+				F76BEF621F46F40400332727 /* nsLatin1Prober.cpp in Sources */,
 				F7ECBA6D1E239DCD003E6328 /* CCCreateCloud.swift in Sources */,
 				F70022FE1EC4C9100080073F /* UtilsFramework.m in Sources */,
 				F77B0ECC1D118A16002130FE /* UIImage+Masking.m in Sources */,
+				F76BEF671F46F40400332727 /* nsSJISProber.cpp in Sources */,
+				F76BEF581F46F40400332727 /* LangVietnameseModel.cpp in Sources */,
 				F77B0ECE1D118A16002130FE /* NSData+CommonCrypto.m in Sources */,
 				F7D424561F063B82009C9782 /* NSNumberFormatter+CTAssetsPickerController.m in Sources */,
 				F70022AA1EC4C9100080073F /* AFURLRequestSerialization.m in Sources */,
 				F7D423851F0596C6009C9782 /* ReaderThumbRender.m in Sources */,
 				F72AAECA1E5C60C700BB17E1 /* AHKActionSheet.m in Sources */,
 				F7D424C51F063B82009C9782 /* HRColorPickerView.m in Sources */,
-				F76BEEDD1F46E74000332727 /* nsUTF8Prober.cpp in Sources */,
 				F70022C81EC4C9100080073F /* OCRichObjectStrings.m in Sources */,
 				F7D423841F0596C6009C9782 /* ReaderThumbQueue.m in Sources */,
 				F7A3217A1E9E3EAF0069AD1B /* CCTransfersCell.m in Sources */,
+				F76BEF4E1F46F40400332727 /* LangPolishModel.cpp in Sources */,
 				F77B0ED11D118A16002130FE /* Acknowledgements.m in Sources */,
+				F76BEF5E1F46F40400332727 /* nsEUCKRProber.cpp in Sources */,
 				F77B0ED31D118A16002130FE /* PPImageScrollingCellView.m in Sources */,
 				F7D4245A1F063B82009C9782 /* UICollectionView+CTAssetsPickerController.m in Sources */,
 				F7D4245B1F063B82009C9782 /* UIImage+CTAssetsPickerController.m in Sources */,
 				F73CC06C1E813DFF006E3047 /* BKPasscodeField.m in Sources */,
+				F76BEF491F46F40400332727 /* LangIrishModel.cpp in Sources */,
 				F77B0ED51D118A16002130FE /* PHAsset+Utility.m in Sources */,
-				F76BEEC61F46E74000332727 /* LangHebrewModel.cpp in Sources */,
 				F70022CE1EC4C9100080073F /* OCShareUser.m in Sources */,
 				F77B0ED91D118A16002130FE /* main.m in Sources */,
 			);

+ 16 - 1
iOSClient/Library/NCUchardet/src/Big5Freq.tab

@@ -9,14 +9,29 @@ set(
 	JpCntx.cpp
 	LangModels/LangArabicModel.cpp
 	LangModels/LangBulgarianModel.cpp
-	LangModels/LangRussianModel.cpp
+    LangModels/LangCroatianModel.cpp
+    LangModels/LangCzechModel.cpp
 	LangModels/LangEsperantoModel.cpp
+	LangModels/LangEstonianModel.cpp
+	LangModels/LangFinnishModel.cpp
 	LangModels/LangFrenchModel.cpp
 	LangModels/LangDanishModel.cpp
 	LangModels/LangGermanModel.cpp
 	LangModels/LangGreekModel.cpp
 	LangModels/LangHungarianModel.cpp
 	LangModels/LangHebrewModel.cpp
+	LangModels/LangIrishModel.cpp
+	LangModels/LangItalianModel.cpp
+    LangModels/LangLithuanianModel.cpp
+    LangModels/LangLatvianModel.cpp
+    LangModels/LangMalteseModel.cpp
+    LangModels/LangPolishModel.cpp
+    LangModels/LangPortugueseModel.cpp
+	LangModels/LangRomanianModel.cpp
+	LangModels/LangRussianModel.cpp
+	LangModels/LangSlovakModel.cpp
+    LangModels/LangSloveneModel.cpp
+    LangModels/LangSwedishModel.cpp
 	LangModels/LangSpanishModel.cpp
 	LangModels/LangThaiModel.cpp
 	LangModels/LangTurkishModel.cpp

+ 292 - 0
iOSClient/Library/NCUchardet/src/CharDistribution.cpp

@@ -0,0 +1,292 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Croatian *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-25 23:50:27.590137
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Windows_1250_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 4X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 6X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,ILL,SYM,SYM,SYM,SYM,ILL,SYM, 23,SYM, 49, 50, 24, 51, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,ILL,SYM, 23,SYM, 52, 53, 24, 54, /* 9X */
+  SYM,SYM,SYM, 40,SYM, 55,SYM,SYM,SYM,SYM, 56,SYM,SYM,SYM,SYM, 57, /* AX */
+  SYM,SYM,SYM, 40,SYM,SYM,SYM,SYM,SYM, 58, 59,SYM, 60,SYM, 61, 62, /* BX */
+   63, 41, 43, 64, 36, 65, 25, 39, 18, 31, 66, 47, 67, 68, 69, 70, /* CX */
+   26, 71, 72, 44, 73, 74, 32,SYM, 75, 76, 48, 77, 33, 78, 79, 80, /* DX */
+   81, 41, 43, 82, 36, 83, 25, 39, 18, 31, 84, 47, 85, 86, 87, 88, /* EX */
+   26, 89, 90, 44, 91, 92, 32,SYM, 93, 94, 48, 95, 33, 96, 97,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_2_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 4X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 6X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 98,SYM, 40,SYM, 99,100,SYM,SYM, 23,101,102,103,SYM, 24,104, /* AX */
+  SYM,105,SYM, 40,SYM,106,107,SYM,SYM, 23,108,109,110,SYM, 24,111, /* BX */
+  112, 41, 43,113, 36,114, 25, 39, 18, 31,115, 47,116,117,118,119, /* CX */
+   26,120,121, 44,122,123, 32,SYM,124,125, 48,126, 33,127,128,129, /* DX */
+  130, 41, 43,131, 36,132, 25, 39, 18, 31,133, 47,134,135,136,137, /* EX */
+   26,138,139, 44,140,141, 32,SYM,142,143, 48,144, 33,145,146,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_16_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 4X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 6X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,147,148, 40,SYM,SYM, 23,SYM, 23,SYM,149,SYM,150,SYM,151,152, /* AX */
+  SYM,SYM, 18, 40, 24,SYM,SYM,SYM, 24, 18,153,SYM, 45, 45,154,155, /* BX */
+   46, 41, 43,156, 36, 25,157, 39, 35, 31, 42, 47,158,159,160,161, /* CX */
+   26,162,163, 44,164,165, 32,166,167,168, 48,169, 33,170,171,172, /* DX */
+   46, 41, 43,173, 36, 25,174, 39, 35, 31, 42, 47,175,176,177,178, /* EX */
+   26,179,180, 44,181,182, 32,183,184,185, 48,186, 33,187,188,189, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Mac_Centraleurope_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 4X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 6X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+   36,190,191, 31,192, 32, 33, 41,193, 18, 36, 18, 25, 25, 31,194, /* 8X */
+  195,196,197,198,199,200,201, 44,202,203, 32, 37, 48,204,205, 33, /* 9X */
+  SYM,SYM,206,SYM,SYM,SYM,SYM,207,SYM,SYM,SYM,208,SYM,SYM,209,210, /* AX */
+  211,212,SYM,SYM,213,214,SYM,SYM, 40,215,216,217,218,219,220,221, /* BX */
+  222,223,SYM,SYM,224,225,SYM,SYM,SYM,SYM,SYM,226,227, 37,228, 38, /* CX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 38,229,230,231,SYM,SYM,232,233, /* DX */
+  234, 23,SYM,SYM, 23,235,236, 41,237,238,239, 24, 24,240, 44,241, /* EX */
+  242,243, 48,244,245,246,247,248,249,249,249,249, 40,249,249,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_13_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 4X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 6X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 34,SYM,249,SYM,SYM,SYM,SYM,249, /* AX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 34,SYM,249,SYM,SYM,SYM,SYM,249, /* BX */
+  249,249,249, 25, 36,249,249,249, 18, 31,249,249,249,249,249,249, /* CX */
+   23,249,249, 44, 38, 37, 32,SYM,249, 40,249,249, 33,249, 24,249, /* DX */
+  249,249,249, 25, 36,249,249,249, 18, 31,249,249,249,249,249,249, /* EX */
+   23,249,249, 44, 38, 37, 32,SYM,249, 40,249,249, 33,249, 24,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Ibm852_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 4X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 20, 15,  2, 22, 17, 21,  1,  7,  9, 10, 12,  4,  3, /* 6X */
+   14, 30,  6,  8,  5, 11, 13, 28, 29, 27, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+   39, 33, 31, 43, 36,249, 25, 39, 40, 47,249,249,249,249, 36, 25, /* 8X */
+   31,249,249,249, 32,249,249,249,249, 32, 33,249,249, 40,SYM, 18, /* 9X */
+   41,249, 44, 48,249,249, 24, 24,249,249,SYM,249, 18,249,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 41, 43,249,249,SYM,SYM,SYM,SYM,249,249,SYM, /* BX */
+  SYM,SYM,SYM,SYM,SYM,SYM,249,249,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* CX */
+   26, 26,249, 47,249,249,249,249,249,SYM,SYM,SYM,SYM,249,249,SYM, /* DX */
+   44,249,249,249,249,249, 23, 23,249, 48,249,249,249,249,249,SYM, /* EX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,249,249,249,SYM,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 712
+ * First 512 sequences: 0.9989731099787131
+ *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,0,2,0,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,
+};
+
+
+const SequenceModel Windows_1250CroatianModel =
+{
+  Windows_1250_CharToOrderMap,
+  CroatianLangModel,
+  31,
+  (float)0.9989731099787131,
+  PR_TRUE,
+  "WINDOWS-1250"
+};
+
+const SequenceModel Iso_8859_2CroatianModel =
+{
+  Iso_8859_2_CharToOrderMap,
+  CroatianLangModel,
+  31,
+  (float)0.9989731099787131,
+  PR_TRUE,
+  "ISO-8859-2"
+};
+
+const SequenceModel Iso_8859_16CroatianModel =
+{
+  Iso_8859_16_CharToOrderMap,
+  CroatianLangModel,
+  31,
+  (float)0.9989731099787131,
+  PR_TRUE,
+  "ISO-8859-16"
+};
+
+const SequenceModel Mac_CentraleuropeCroatianModel =
+{
+  Mac_Centraleurope_CharToOrderMap,
+  CroatianLangModel,
+  31,
+  (float)0.9989731099787131,
+  PR_TRUE,
+  "MAC-CENTRALEUROPE"
+};
+
+const SequenceModel Iso_8859_13CroatianModel =
+{
+  Iso_8859_13_CharToOrderMap,
+  CroatianLangModel,
+  31,
+  (float)0.9989731099787131,
+  PR_TRUE,
+  "ISO-8859-13"
+};
+
+const SequenceModel Ibm852CroatianModel =
+{
+  Ibm852_CharToOrderMap,
+  CroatianLangModel,
+  31,
+  (float)0.9989731099787131,
+  PR_TRUE,
+  "IBM852"
+};

+ 281 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangCzechModel.cpp

@@ -0,0 +1,281 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Czech *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-21 03:28:11.733089
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Windows_1250_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  3, 22, 14, 15,  1, 30, 32, 17,  4, 21, 12, 10, 16,  2,  0, /* 4X */
+    8, 40,  9,  6,  5, 13,  7, 36, 34, 20, 19,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  3, 22, 14, 15,  1, 30, 32, 17,  4, 21, 12, 10, 16,  2,  0, /* 6X */
+    8, 40,  9,  6,  5, 13,  7, 36, 34, 20, 19,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,ILL,SYM,SYM,SYM,SYM,ILL,SYM, 29,SYM, 46, 38, 26, 47, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,ILL,SYM, 29,SYM, 46, 38, 26, 48, /* 9X */
+  SYM,SYM,SYM, 49,SYM, 50,SYM,SYM,SYM,SYM, 51,SYM,SYM,SYM,SYM, 52, /* AX */
+  SYM,SYM,SYM, 53,SYM,SYM,SYM,SYM,SYM, 54, 55,SYM, 45,SYM, 45, 56, /* BX */
+   57, 18, 58, 59, 42, 60, 61, 62, 25, 24, 63, 64, 23, 11, 65, 39, /* CX */
+   66, 67, 35, 37, 68, 69, 41,SYM, 27, 31, 33, 70, 43, 28, 71, 72, /* DX */
+   73, 18, 74, 75, 42, 76, 77, 78, 25, 24, 79, 80, 23, 11, 81, 39, /* EX */
+   82, 83, 35, 37, 84, 85, 41,SYM, 27, 31, 33, 86, 43, 28, 87,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Mac_Centraleurope_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  3, 22, 14, 15,  1, 30, 32, 17,  4, 21, 12, 10, 16,  2,  0, /* 4X */
+    8, 40,  9,  6,  5, 13,  7, 36, 34, 20, 19,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  3, 22, 14, 15,  1, 30, 32, 17,  4, 21, 12, 10, 16,  2,  0, /* 6X */
+    8, 40,  9,  6,  5, 13,  7, 36, 34, 20, 19,SYM,SYM,SYM,SYM,CTR, /* 7X */
+   42, 88, 89, 24, 90, 41, 43, 18, 91, 25, 42, 25, 92, 93, 24, 94, /* 8X */
+   95, 39, 11, 39, 44, 44, 96, 37, 97, 98, 41, 99, 33, 23, 23, 43, /* 9X */
+  SYM,SYM,100,SYM,SYM,SYM,SYM,101,SYM,SYM,SYM,102,SYM,SYM,103,104, /* AX */
+  105,106,SYM,SYM,107,108,SYM,SYM,109,110,111, 45, 45,112,113,114, /* BX */
+  115,116,SYM,SYM,117, 35,SYM,SYM,SYM,SYM,SYM, 35,118,119,120,121, /* CX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,122,123,124, 27,SYM,SYM, 27,125, /* DX */
+  126, 29,SYM,SYM, 29, 46, 46, 18, 38, 38, 11, 26, 26,127, 37,128, /* EX */
+  129, 31, 33, 31,130,131,132,133, 28, 28,134,135,136,137,138,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Ibm852_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  3, 22, 14, 15,  1, 30, 32, 17,  4, 21, 12, 10, 16,  2,  0, /* 4X */
+    8, 40,  9,  6,  5, 13,  7, 36, 34, 20, 19,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  3, 22, 14, 15,  1, 30, 32, 17,  4, 21, 12, 10, 16,  2,  0, /* 6X */
+    8, 40,  9,  6,  5, 13,  7, 36, 34, 20, 19,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  139, 43, 24,140, 42, 31,141,142,143,144,145,146,147,148, 42,149, /* 8X */
+   24,150,151,152, 41, 45, 45, 46, 46, 41, 43, 38, 38,153,SYM, 25, /* 9X */
+   18, 11, 37, 33,154,155, 26, 26,156,157,SYM,158, 25,159,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 18,160, 23,161,SYM,SYM,SYM,SYM,162,163,SYM, /* BX */
+  SYM,SYM,SYM,SYM,SYM,SYM,164,165,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* CX */
+  166,167, 39,168, 39, 35, 11,169, 23,SYM,SYM,SYM,SYM,170, 31,SYM, /* DX */
+   37,171,172,173,174, 35, 29, 29,175, 33,176,177, 28, 28,178,SYM, /* EX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,179, 27, 27,SYM,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_2_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  3, 22, 14, 15,  1, 30, 32, 17,  4, 21, 12, 10, 16,  2,  0, /* 4X */
+    8, 40,  9,  6,  5, 13,  7, 36, 34, 20, 19,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  3, 22, 14, 15,  1, 30, 32, 17,  4, 21, 12, 10, 16,  2,  0, /* 6X */
+    8, 40,  9,  6,  5, 13,  7, 36, 34, 20, 19,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,180,SYM,181,SYM, 45, 46,SYM,SYM, 29,182, 38,183,SYM, 26,184, /* AX */
+  SYM,185,SYM,186,SYM, 45, 46,SYM,SYM, 29,187, 38,188,SYM, 26,189, /* BX */
+  190, 18,191,192, 42,193,194,195, 25, 24,196,197, 23, 11,198, 39, /* CX */
+  199,200, 35, 37,201,202, 41,SYM, 27, 31, 33,203, 43, 28,204,205, /* DX */
+  206, 18,207,208, 42,209,210,211, 25, 24,212,213, 23, 11,214, 39, /* EX */
+  215,216, 35, 37,217,218, 41,SYM, 27, 31, 33,219, 43, 28,220,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 1025
+ * First 512 sequences: 0.9786035192432675
+ * Next 512 sequences (512-1024): 0.02139445610866691
+ * Rest: 2.0246480655940202e-06
+ * Negative sequences: TODO
+ */
+static const PRUint8 CzechLangModel[] =
+{
+  2,2,3,2,3,3,3,3,3,3,3,2,3,3,3,3,3,3,2,3,
+   2,3,3,0,0,3,3,3,0,2,3,0,3,0,3,2,2,0,2,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,2,3,
+   2,3,3,0,0,3,3,3,0,3,3,2,3,2,3,2,2,2,2,2,2,
+  3,3,3,3,3,3,3,2,0,2,3,3,3,3,3,3,2,3,3,3,
+   3,2,2,3,3,2,2,0,3,2,3,3,3,0,2,0,0,2,0,0,2,
+  3,3,3,2,2,3,3,3,3,3,3,0,3,3,3,3,3,3,0,3,
+   3,3,3,0,0,3,3,3,0,3,3,0,3,0,3,2,2,0,2,2,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,
+   0,2,3,0,2,3,3,2,0,3,3,0,3,0,2,2,2,2,2,0,2,
+  3,3,3,3,3,2,2,3,2,3,3,3,3,3,2,2,2,3,3,3,
+   3,2,2,3,3,2,0,3,3,3,0,3,2,0,0,2,2,2,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,2,
+   3,2,3,0,2,2,0,0,2,0,2,2,2,2,0,2,2,0,2,0,0,
+  3,3,3,3,3,2,2,0,2,3,3,3,3,3,2,3,0,2,3,3,
+   3,2,2,3,3,2,2,2,3,3,0,3,0,0,0,2,0,2,0,0,0,
+  3,3,3,3,3,3,3,0,2,3,3,3,2,3,2,2,2,2,3,0,
+   3,2,2,3,2,2,0,3,2,2,2,3,2,0,2,2,0,0,0,0,0,
+  3,3,3,3,3,3,3,3,3,2,2,2,3,3,2,3,3,2,3,3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2,2,2,0,0,0,0,0,0,0,0,
+  0,0,2,0,0,2,3,2,2,2,2,0,2,0,2,2,2,2,0,3,
+   0,2,2,0,0,3,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,
+  2,2,2,2,3,3,0,0,3,2,2,2,2,2,2,2,2,0,2,0,
+   2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,
+  2,0,0,2,0,0,2,0,0,0,0,0,2,3,0,0,0,0,0,0,
+   0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,
+  2,2,2,2,3,0,2,0,0,0,2,0,2,2,2,0,0,2,0,0,
+   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,
+  0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,2,2,0,0,3,
+   0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
+  2,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,2,0,
+   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  2,0,0,2,0,2,0,0,0,0,0,0,0,2,0,0,2,0,0,0,
+   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,
+   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Windows_1250CzechModel =
+{
+  Windows_1250_CharToOrderMap,
+  CzechLangModel,
+  41,
+  (float)0.9786035192432675,
+  PR_TRUE,
+  "WINDOWS-1250"
+};
+
+const SequenceModel Mac_CentraleuropeCzechModel =
+{
+  Mac_Centraleurope_CharToOrderMap,
+  CzechLangModel,
+  41,
+  (float)0.9786035192432675,
+  PR_TRUE,
+  "MAC-CENTRALEUROPE"
+};
+
+const SequenceModel Ibm852CzechModel =
+{
+  Ibm852_CharToOrderMap,
+  CzechLangModel,
+  41,
+  (float)0.9786035192432675,
+  PR_TRUE,
+  "IBM852"
+};
+
+const SequenceModel Iso_8859_2CzechModel =
+{
+  Iso_8859_2_CharToOrderMap,
+  CzechLangModel,
+  41,
+  (float)0.9786035192432675,
+  PR_TRUE,
+  "ISO-8859-2"
+};

+ 263 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangDanishModel.cpp

@@ -0,0 +1,263 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Estonian *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-26 23:47:54.476870
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_4_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 4X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 6X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 55, 56, 57,SYM, 58, 59,SYM,SYM, 29, 45, 60, 61,SYM, 32,SYM, /* AX */
+  SYM, 62,SYM, 63,SYM, 64, 65,SYM,SYM, 29, 45, 66, 67, 68, 32, 69, /* BX */
+   37, 43, 70, 71, 18, 44, 47, 72, 73, 33, 74, 75, 76, 36, 77, 39, /* CX */
+   78, 79, 31, 80, 81, 20, 24,SYM, 38, 82, 52, 83, 21, 84, 34, 85, /* DX */
+   37, 43, 86, 87, 18, 44, 47, 88, 89, 33, 90, 91, 92, 36, 93, 39, /* EX */
+   94, 95, 31, 96, 97, 20, 24,SYM, 38, 98, 52, 99, 21,100, 34,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1252_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 4X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 6X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,101,SYM,SYM,SYM,SYM,SYM,SYM, 29,SYM,102,ILL, 32,ILL, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 29,SYM,103,ILL, 32,104, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 50,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   40, 43,105,106, 18, 44, 47, 48, 41, 33,107,108, 35, 36,109,110, /* CX */
+   46,111, 53, 42,112, 20, 24,SYM, 38, 54, 52,113, 21,114,115,116, /* DX */
+   40, 43,117,118, 18, 44, 47, 48, 41, 33,119,120, 35, 36,121,122, /* EX */
+   46,123, 53, 42,124, 20, 24,SYM, 38, 54, 52,125, 21,126,127,128, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_15_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 4X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 6X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM, 29,SYM, 29,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM, 32, 50,SYM,SYM, 32,SYM,SYM,SYM,129,130,131,SYM, /* BX */
+   40, 43,132,133, 18, 44, 47, 48, 41, 33,134,135, 35, 36,136,137, /* CX */
+   46,138, 53, 42,139, 20, 24,SYM, 38, 54, 52,140, 21,141,142,143, /* DX */
+   40, 43,144,145, 18, 44, 47, 48, 41, 33,146,147, 35, 36,148,149, /* EX */
+   46,150, 53, 42,151, 20, 24,SYM, 38, 54, 52,152, 21,153,154,155, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_13_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 4X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 6X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 38,SYM,156,SYM,SYM,SYM,SYM, 47, /* AX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 38,SYM,157,SYM,SYM,SYM,SYM, 47, /* BX */
+  158,159, 37,160, 18, 44,161, 45,162, 33,163,164,165,166, 39,167, /* CX */
+   29,168,169, 42, 31, 20, 24,SYM,170, 51,171, 34, 21, 49, 32,172, /* DX */
+  173,174, 37,175, 18, 44,176, 45,177, 33,178,179,180,181, 39,182, /* EX */
+   29,183,184, 42, 31, 20, 24,SYM,185, 51,186, 34, 21, 49, 32,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1257_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 4X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 23, 10,  2, 22, 15, 16,  1, 17,  8,  5, 12,  7,  9, /* 6X */
+   14, 28, 11,  3,  4,  6, 13, 27, 26, 25, 30,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,ILL,SYM,SYM,SYM,SYM,ILL,SYM,ILL,SYM,ILL,SYM,SYM,SYM, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,ILL,SYM,ILL,SYM,ILL,SYM,SYM,ILL, /* 9X */
+  SYM,ILL,SYM,SYM,SYM,ILL,SYM,SYM, 38,SYM,187,SYM,SYM,SYM,SYM, 47, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 50,SYM,SYM, 38,SYM,188,SYM,SYM,SYM,SYM, 47, /* BX */
+  189,190, 37,191, 18, 44,192, 45,193, 33,194,195,196,197, 39,198, /* CX */
+   29,199,200, 42, 31, 20, 24,SYM,201, 51,202, 34, 21, 49, 32,203, /* DX */
+  204,205, 37,206, 18, 44,207, 45,208, 33,209,210,211,212, 39,213, /* EX */
+   29,214,215, 42, 31, 20, 24,SYM,216, 51,217, 34, 21, 49, 32,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 853
+ * First 512 sequences: 0.9972721312183132
+ * Next 512 sequences (512-1024): 0.0027278687816868537
+ * Rest: -5.204170427930421e-18
+ * Negative sequences: TODO
+ */
+static const PRUint8 EstonianLangModel[] =
+{
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,2,3,3,0,3,3,3,3,2,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,2,3,3,2,2,3,3,2,2,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,2,3,3,0,3,3,3,2,0,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,2,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ceModel Iso_8859_4EstonianModel =
+{
+  Iso_8859_4_CharToOrderMap,
+  EstonianLangModel,
+  33,
+  (float)0.9972721312183132,
+  PR_TRUE,
+  "ISO-8859-4"
+};
+
+const SequenceModel Windows_1252EstonianModel =
+{
+  Windows_1252_CharToOrderMap,
+  EstonianLangModel,
+  33,
+  (float)0.9972721312183132,
+  PR_TRUE,
+  "WINDOWS-1252"
+};
+
+const SequenceModel Iso_8859_15EstonianModel =
+{
+  Iso_8859_15_CharToOrderMap,
+  EstonianLangModel,
+  33,
+  (float)0.9972721312183132,
+  PR_TRUE,
+  "ISO-8859-15"
+};
+
+const SequenceModel Iso_8859_13EstonianModel =
+{
+  Iso_8859_13_CharToOrderMap,
+  EstonianLangModel,
+  33,
+  (float)0.9972721312183132,
+  PR_TRUE,
+  "ISO-8859-13"
+};
+
+const SequenceModel Windows_1257EstonianModel =
+{
+  Windows_1257_CharToOrderMap,
+  EstonianLangModel,
+  33,
+  (float)0.9972721312183132,
+  PR_TRUE,
+  "WINDOWS-1257"
+};

+ 291 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangFinnishModel.cpp

@@ -0,0 +1,291 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Finnish *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-21 18:15:05.189948
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_15_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 4X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 6X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM, 27,SYM, 27,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM, 28, 61,SYM,SYM, 28,SYM,SYM,SYM, 62, 63, 64,SYM, /* BX */
+   49, 35, 65, 46, 11, 56, 39, 37, 40, 30, 51, 31, 66, 36, 67, 57, /* CX */
+   68, 58, 52, 33, 34, 59, 22,SYM, 69, 70, 38, 71, 32, 72, 73, 55, /* DX */
+   49, 35, 74, 46, 11, 56, 39, 37, 40, 30, 51, 31, 75, 36, 76, 57, /* EX */
+   77, 58, 52, 33, 34, 59, 22,SYM, 78, 79, 38, 80, 32, 81, 82, 83, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1252_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 4X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 6X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM, 84,SYM,SYM,SYM,SYM,SYM,SYM, 27,SYM, 85,ILL, 28,ILL, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 27,SYM, 86,ILL, 28, 87, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 88,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   49, 35, 89, 46, 11, 56, 39, 37, 40, 30, 51, 31, 90, 36, 91, 57, /* CX */
+   92, 58, 52, 33, 34, 59, 22,SYM, 93, 94, 38, 95, 32, 96, 97, 55, /* DX */
+   49, 35, 98, 46, 11, 56, 39, 37, 40, 30, 51, 31, 99, 36,100, 57, /* EX */
+  101, 58, 52, 33, 34, 59, 22,SYM,102,103, 38,104, 32,105,106,107, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_4_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 4X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 6X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,108,109, 47,SYM,110,111,SYM,SYM, 27,112,113,114,SYM, 28,SYM, /* AX */
+  SYM,115,SYM, 47,SYM,116,117,SYM,SYM, 27,118,119,120, 45, 28, 45, /* BX */
+   53, 35,121, 46, 11, 56, 39,122, 43, 30,123, 31,124, 36,125,126, /* CX */
+  127, 54,128,129, 34, 59, 22,SYM,130,131, 38,132, 32,133,134, 55, /* DX */
+   53, 35,135, 46, 11, 56, 39,136, 43, 30,137, 31,138, 36,139,140, /* EX */
+  141, 54,142,143, 34, 59, 22,SYM,144,145, 38,146, 32,147,148,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_13_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 4X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 6X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,149,SYM, 47,SYM,SYM,SYM,SYM, 39, /* AX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,150,SYM, 47,SYM,SYM,SYM,SYM, 39, /* BX */
+  151,152, 53, 41, 11, 56,153,154, 43, 30,155,156,157,158,159,160, /* CX */
+   27,161, 54, 33,162, 59, 22,SYM,163,164,165,166, 32, 60, 28, 55, /* DX */
+  167,168, 53, 41, 11, 56,169,170, 43, 30,171,172,173,174,175,176, /* EX */
+   27,177, 54, 33,178, 59, 22,SYM,179,180,181,182, 32, 60, 28,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_9_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 4X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 6X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM,183,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   49, 35,184, 46, 11, 56, 39, 37, 40, 30, 51, 31,185, 36,186, 57, /* CX */
+   50, 58, 52, 33, 34, 59, 22,SYM,187,188, 38,189, 32, 48, 42, 55, /* DX */
+   49, 35,190, 46, 11, 56, 39, 37, 40, 30, 51, 31,191, 36,192, 57, /* EX */
+   50, 58, 52, 33, 34, 59, 22,SYM,193,194, 38,195, 32, 44, 42,196, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_1_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 4X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 19, 21, 18,  4, 23, 20, 14,  1, 15,  9,  6, 12,  2,  7, /* 6X */
+   16, 29, 10,  5,  3,  8, 13, 24, 26, 17, 25,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM,197,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   49, 35,198, 46, 11, 56, 39, 37, 40, 30, 51, 31,199, 36,200, 57, /* CX */
+  201, 58, 52, 33, 34, 59, 22,SYM,202,203, 38,204, 32,205,206, 55, /* DX */
+   49, 35,207, 46, 11, 56, 39, 37, 40, 30, 51, 31,208, 36,209, 57, /* EX */
+  210, 58, 52, 33, 34, 59, 22,SYM,211,212, 38,213, 32,214,215,216, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 919
+ * First 512 sequences: 0.9985378147555799
+ * Next 512 sequences (512-1024): 0.0014621852444200612
+ * Rest: 3.881443777498106e-17
+ * Negative sequences: TODO
+ */
+static const PRUint8 FinnishLangModel[] =
+{
+  3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,2,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,3,2,3,3,0,3,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,2,0,0,0,2,
+  3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,2,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,0,3,3,2,3,2,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,0,2,3,2,3,2,2,0,2,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,
+  3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,0,0,2,2,0,0,0,0,0,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,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  2,2,0,0,0,2,0,0,3,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Iso_8859_15FinnishModel =
+{
+  Iso_8859_15_CharToOrderMap,
+  FinnishLangModel,
+  30,
+  (float)0.9985378147555799,
+  PR_TRUE,
+  "ISO-8859-15"
+};
+
+const SequenceModel Windows_1252FinnishModel =
+{
+  Windows_1252_CharToOrderMap,
+  FinnishLangModel,
+  30,
+  (float)0.9985378147555799,
+  PR_TRUE,
+  "WINDOWS-1252"
+};
+
+const SequenceModel Iso_8859_4FinnishModel =
+{
+  Iso_8859_4_CharToOrderMap,
+  FinnishLangModel,
+  30,
+  (float)0.9985378147555799,
+  PR_TRUE,
+  "ISO-8859-4"
+};
+
+const SequenceModel Iso_8859_13FinnishModel =
+{
+  Iso_8859_13_CharToOrderMap,
+  FinnishLangModel,
+  30,
+  (float)0.9985378147555799,
+  PR_TRUE,
+  "ISO-8859-13"
+};
+
+const SequenceModel Iso_8859_9FinnishModel =
+{
+  Iso_8859_9_CharToOrderMap,
+  FinnishLangModel,
+  30,
+  (float)0.9985378147555799,
+  PR_TRUE,
+  "ISO-8859-9"
+};
+
+const SequenceModel Iso_8859_1FinnishModel =
+{
+  Iso_8859_1_CharToOrderMap,
+  FinnishLangModel,
+  30,
+  (float)0.9985378147555799,
+  PR_TRUE,
+  "ISO-8859-1"
+};

+ 230 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangFrenchModel.cpp

@@ -0,0 +1,230 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Irish *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-27 00:33:40.158624
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_1_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 16,  8, 11,  5, 19, 12,  3,  1, 27, 25,  9, 13,  2, 10, /* 4X */
+   21, 30,  4,  6,  7, 15, 23, 26, 29, 24, 28,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 16,  8, 11,  5, 19, 12,  3,  1, 27, 25,  9, 13,  2, 10, /* 6X */
+   21, 30,  4,  6,  7, 15, 23, 26, 29, 24, 28,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 44,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   45, 14, 46, 47, 33, 48, 49, 39, 35, 18, 42, 37, 50, 17, 51, 40, /* CX */
+   52, 32, 43, 22, 53, 54, 38,SYM, 36, 55, 20, 56, 31, 57, 58, 59, /* DX */
+   60, 14, 61, 62, 33, 63, 64, 39, 35, 18, 42, 37, 65, 17, 66, 40, /* EX */
+   67, 32, 43, 22, 68, 69, 38,SYM, 36, 70, 20, 71, 31, 72, 73, 74, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1252_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 16,  8, 11,  5, 19, 12,  3,  1, 27, 25,  9, 13,  2, 10, /* 4X */
+   21, 30,  4,  6,  7, 15, 23, 26, 29, 24, 28,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 16,  8, 11,  5, 19, 12,  3,  1, 27, 25,  9, 13,  2, 10, /* 6X */
+   21, 30,  4,  6,  7, 15, 23, 26, 29, 24, 28,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM, 75,SYM,SYM,SYM,SYM,SYM,SYM, 34,SYM, 76,ILL, 77,ILL, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 34,SYM, 78,ILL, 79, 80, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 81,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   82, 14, 83, 84, 33, 85, 86, 39, 35, 18, 42, 37, 87, 17, 88, 40, /* CX */
+   89, 32, 43, 22, 90, 91, 38,SYM, 36, 92, 20, 93, 31, 94, 95, 96, /* DX */
+   97, 14, 98, 99, 33,100,101, 39, 35, 18, 42, 37,102, 17,103, 40, /* EX */
+  104, 32, 43, 22,105,106, 38,SYM, 36,107, 20,108, 31,109,110,111, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_15_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 16,  8, 11,  5, 19, 12,  3,  1, 27, 25,  9, 13,  2, 10, /* 4X */
+   21, 30,  4,  6,  7, 15, 23, 26, 29, 24, 28,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 16,  8, 11,  5, 19, 12,  3,  1, 27, 25,  9, 13,  2, 10, /* 6X */
+   21, 30,  4,  6,  7, 15, 23, 26, 29, 24, 28,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM, 34,SYM, 34,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,112,113,SYM,SYM,114,SYM,SYM,SYM,115,116,117,SYM, /* BX */
+  118, 14,119,120, 33,121,122, 39, 35, 18, 42, 37,123, 17,124, 40, /* CX */
+  125, 32, 43, 22,126,127, 38,SYM, 36,128, 20,129, 31,130,131,132, /* DX */
+  133, 14,134,135, 33,136,137, 39, 35, 18, 42, 37,138, 17,139, 40, /* EX */
+  140, 32, 43, 22,141,142, 38,SYM, 36,143, 20,144, 31,145,146,147, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_9_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 16,  8, 11,  5, 19, 12,  3,  1, 27, 25,  9, 13,  2, 10, /* 4X */
+   21, 30,  4,  6,  7, 15, 23, 26, 29, 24, 28,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 16,  8, 11,  5, 19, 12,  3,  1, 27, 25,  9, 13,  2, 10, /* 6X */
+   21, 30,  4,  6,  7, 15, 23, 26, 29, 24, 28,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM,148,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+  149, 14,150,151, 33,152,153, 39, 35, 18, 42, 37,154, 17,155, 40, /* CX */
+  156, 32, 43, 22,157,158, 38,SYM, 36,159, 20,160, 31,161,162,163, /* DX */
+  164, 14,165,166, 33,167,168, 39, 35, 18, 42, 37,169, 17,170, 40, /* EX */
+  171, 32, 43, 22,172,173, 38,SYM, 36,174, 20,175, 31, 41,176,177, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 701
+ * First 512 sequences: 0.9974076651249096
+ * Next 512 sequences (512-1024): 0.0025923348750903907
+ * Rest: -2.7755575615628914e-17
+ * Negative sequences: TODO
+ */
+static const PRUint8 IrishLangModel[] =
+{
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,0,3,0,3,0,3,3,3,3,2,3,3,2,
+  3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,0,2,3,3,3,3,3,3,3,0,3,3,3,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,0,2,3,0,2,
+  3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,2,0,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,2,3,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,0,3,3,3,3,3,3,2,3,3,0,
+  3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,3,3,3,3,3,2,3,3,3,0,3,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,0,2,3,3,3,3,3,3,2,3,0,3,3,3,3,2,2,3,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,2,0,3,3,3,2,3,3,3,3,2,3,0,3,3,2,0,3,0,2,
+  3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,3,0,0,
+  2,3,3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0,0,0,0,
+  3,3,3,3,3,3,3,2,0,2,3,2,0,2,0,2,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,
+  3,3,2,0,2,3,0,0,0,0,3,0,0,0,0,3,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,
+  3,3,2,3,0,3,2,0,0,0,3,2,2,2,0,2,2,0,0,0,0,0,0,0,2,0,0,0,2,0,2,
+  3,3,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,3,0,3,0,2,2,0,0,0,0,0,0,
+  2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Iso_8859_1IrishModel =
+{
+  Iso_8859_1_CharToOrderMap,
+  IrishLangModel,
+  31,
+  (float)0.9974076651249096,
+  PR_TRUE,
+  "ISO-8859-1"
+};
+
+const SequenceModel Windows_1252IrishModel =
+{
+  Windows_1252_CharToOrderMap,
+  IrishLangModel,
+  31,
+  (float)0.9974076651249096,
+  PR_TRUE,
+  "WINDOWS-1252"
+};
+
+const SequenceModel Iso_8859_15IrishModel =
+{
+  Iso_8859_15_CharToOrderMap,
+  IrishLangModel,
+  31,
+  (float)0.9974076651249096,
+  PR_TRUE,
+  "ISO-8859-15"
+};
+
+const SequenceModel Iso_8859_9IrishModel =
+{
+  Iso_8859_9_CharToOrderMap,
+  IrishLangModel,
+  31,
+  (float)0.9974076651249096,
+  PR_TRUE,
+  "ISO-8859-9"
+};

+ 264 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangItalianModel.cpp

@@ -0,0 +1,264 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Italian *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-21 18:46:08.841217
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_3_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 4X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 6X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 59,SYM,SYM,SYM,ILL, 60,SYM,SYM, 61, 48, 47, 62,SYM,ILL, 58, /* AX */
+  SYM, 63,SYM,SYM,SYM,SYM, 64,SYM,SYM, 46, 48, 47, 65,SYM,ILL, 58, /* BX */
+   22, 32, 50,ILL, 39, 66, 67, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* CX */
+  ILL, 44, 29, 33, 51, 68, 34,SYM, 69, 28, 45, 70, 36, 71, 72, 73, /* DX */
+   22, 32, 50,ILL, 39, 74, 75, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* EX */
+  ILL, 44, 29, 33, 51, 76, 34,SYM, 77, 28, 45, 78, 36, 79, 80,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_15_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 4X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 6X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM, 35,SYM, 35,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM, 41, 81,SYM,SYM, 41,SYM,SYM,SYM, 52, 52, 82,SYM, /* BX */
+   22, 32, 50, 43, 39, 53, 54, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* CX */
+   56, 44, 29, 33, 51, 83, 34,SYM, 57, 28, 45, 84, 36, 85, 86, 87, /* DX */
+   22, 32, 50, 43, 39, 53, 54, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* EX */
+   56, 44, 29, 33, 51, 88, 34,SYM, 57, 28, 45, 89, 36, 90, 91, 92, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_9_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 4X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 6X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 93,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   22, 32, 50, 43, 39, 53, 54, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* CX */
+   47, 44, 29, 33, 51, 94, 34,SYM, 57, 28, 45, 95, 36, 96, 48, 97, /* DX */
+   22, 32, 50, 43, 39, 53, 54, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* EX */
+   47, 44, 29, 33, 51, 98, 34,SYM, 57, 28, 45, 99, 36, 46, 48,100, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_1_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 4X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 6X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM,101,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   22, 32, 50, 43, 39, 53, 54, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* CX */
+   56, 44, 29, 33, 51,102, 34,SYM, 57, 28, 45,103, 36,104,105,106, /* DX */
+   22, 32, 50, 43, 39, 53, 54, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* EX */
+   56, 44, 29, 33, 51,107, 34,SYM, 57, 28, 45,108, 36,109,110,111, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1252_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 4X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 16,  9, 10,  2, 17, 14, 19,  0, 27, 21,  5, 12,  4,  3, /* 6X */
+   13, 20,  6,  8,  7, 11, 15, 25, 26, 23, 18,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,112,SYM,SYM,SYM,SYM,SYM,SYM, 35,SYM, 52,ILL, 41,ILL, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 35,SYM, 52,ILL, 41,113, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM,114,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   22, 32, 50, 43, 39, 53, 54, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* CX */
+   56, 44, 29, 33, 51,115, 34,SYM, 57, 28, 45,116, 36,117,118,119, /* DX */
+   22, 32, 50, 43, 39, 53, 54, 38, 24, 30, 55, 40, 31, 37, 42, 49, /* EX */
+   56, 44, 29, 33, 51,120, 34,SYM, 57, 28, 45,121, 36,122,123,124, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 872
+ * First 512 sequences: 0.9989484485502651
+ * Next 512 sequences (512-1024): 0.0010515514497349433
+ * Rest: -4.336808689942018e-17
+ * Negative sequences: TODO
+ */
+static const PRUint8 ItalianLangModel[] =
+{
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,2,0,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,0,3,3,3,0,0,0,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,0,3,3,3,0,2,0,0,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,0,0,0,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,2,3,2,3,0,3,3,2,2,0,
+  3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,2,2,3,2,0,3,3,3,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,2,
+  3,3,3,3,3,3,3,3,3,3,2,3,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2,0,0,0,0,2,2,
+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,2,2,0,0,0,2,0,2,0,2,2,2,0,0,0,0,0,0,
+  2,0,0,0,2,0,3,0,2,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  3,3,3,3,3,3,3,2,3,2,0,2,0,2,0,0,2,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,
+  3,3,3,3,0,3,0,3,2,3,0,2,0,3,0,3,0,0,0,0,0,2,0,2,0,2,3,0,0,0,0,0,0,0,
+  3,3,3,3,2,2,2,2,0,2,2,3,2,0,0,0,0,0,0,2,0,3,0,2,0,2,0,2,0,0,0,0,0,2,
+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,2,3,2,2,3,3,2,3,2,3,0,2,2,0,2,3,0,2,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,
+  0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  2,0,0,0,3,2,2,0,2,2,0,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  2,0,0,0,3,2,2,0,0,2,2,0,0,0,0,2,2,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Iso_8859_3ItalianModel =
+{
+  Iso_8859_3_CharToOrderMap,
+  ItalianLangModel,
+  34,
+  (float)0.9989484485502651,
+  PR_TRUE,
+  "ISO-8859-3"
+};
+
+const SequenceModel Iso_8859_15ItalianModel =
+{
+  Iso_8859_15_CharToOrderMap,
+  ItalianLangModel,
+  34,
+  (float)0.9989484485502651,
+  PR_TRUE,
+  "ISO-8859-15"
+};
+
+const SequenceModel Iso_8859_9ItalianModel =
+{
+  Iso_8859_9_CharToOrderMap,
+  ItalianLangModel,
+  34,
+  (float)0.9989484485502651,
+  PR_TRUE,
+  "ISO-8859-9"
+};
+
+const SequenceModel Iso_8859_1ItalianModel =
+{
+  Iso_8859_1_CharToOrderMap,
+  ItalianLangModel,
+  34,
+  (float)0.9989484485502651,
+  PR_TRUE,
+  "ISO-8859-1"
+};
+
+const SequenceModel Windows_1252ItalianModel =
+{
+  Windows_1252_CharToOrderMap,
+  ItalianLangModel,
+  34,
+  (float)0.9989484485502651,
+  PR_TRUE,
+  "WINDOWS-1252"
+};

+ 207 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangLatvianModel.cpp

@@ -0,0 +1,207 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Latvian *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-21 00:19:18.362275
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_4_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 17, 22, 13,  3, 25, 19, 28,  1, 16, 11,  9, 12,  7, 10, /* 4X */
+   15, 38,  4,  2,  5,  6, 14, 33, 35, 34, 20,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 17, 22, 13,  3, 25, 19, 28,  1, 16, 11,  9, 12,  7, 10, /* 6X */
+   15, 38,  4,  2,  5,  6, 14, 33, 35, 34, 20,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 55, 56, 57,SYM, 58, 26,SYM,SYM, 23, 21, 31, 59,SYM, 29,SYM, /* AX */
+  SYM, 60,SYM, 61,SYM, 62, 26,SYM,SYM, 23, 21, 31, 63, 48, 29, 48, /* BX */
+    8, 42, 64, 65, 40, 52, 53, 66, 32, 37, 67, 43, 46, 45, 49, 18, /* CX */
+   68, 24, 51, 30, 69, 70, 36,SYM, 71, 72, 73, 74, 39, 75, 27, 44, /* DX */
+    8, 42, 76, 77, 40, 52, 53, 78, 32, 37, 79, 43, 46, 45, 49, 18, /* EX */
+   80, 24, 51, 30, 81, 82, 36,SYM, 83, 84, 85, 86, 39, 87, 27,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_10_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 17, 22, 13,  3, 25, 19, 28,  1, 16, 11,  9, 12,  7, 10, /* 4X */
+   15, 38,  4,  2,  5,  6, 14, 33, 35, 34, 20,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 17, 22, 13,  3, 25, 19, 28,  1, 16, 11,  9, 12,  7, 10, /* 6X */
+   15, 38,  4,  2,  5,  6, 14, 33, 35, 34, 20,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 88, 21, 31, 18, 89, 30,SYM, 26, 90, 23, 91, 29,SYM, 27, 48, /* AX */
+  SYM, 92, 21, 31, 18, 93, 30,SYM, 26, 94, 23, 95, 29, 96, 27, 48, /* BX */
+    8, 42, 97, 98, 40, 52, 53, 99, 32, 37,100, 43, 46, 45, 49,101, /* CX */
+   50, 24, 51, 47,102,103, 36,104,105,106,107,108, 39,109, 54, 44, /* DX */
+    8, 42,110,111, 40, 52, 53,112, 32, 37,113, 43, 46, 45, 49,114, /* EX */
+   50, 24, 51, 47,115,116, 36,117,118,119,120,121, 39,122, 54,123, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_13_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 17, 22, 13,  3, 25, 19, 28,  1, 16, 11,  9, 12,  7, 10, /* 4X */
+   15, 38,  4,  2,  5,  6, 14, 33, 35, 34, 20,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 17, 22, 13,  3, 25, 19, 28,  1, 16, 11,  9, 12,  7, 10, /* 6X */
+   15, 38,  4,  2,  5,  6, 14, 33, 35, 34, 20,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,124,SYM,125,SYM,SYM,SYM,SYM, 53, /* AX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,126,SYM,127,SYM,SYM,SYM,SYM, 53, /* BX */
+  128,129,  8,130, 40, 52,131, 21, 32, 37,132, 46, 31, 30, 18, 26, /* CX */
+   23,133, 24, 47, 51,134, 36,SYM,135, 41,136, 27, 39,137, 29, 44, /* DX */
+  138,139,  8,140, 40, 52,141, 21, 32, 37,142, 46, 31, 30, 18, 26, /* EX */
+   23,143, 24, 47, 51,144, 36,SYM,145, 41,146, 27, 39,147, 29,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 970
+ * First 512 sequences: 0.9904102202220861
+ * Next 512 sequences (512-1024): 0.009589779777913882
+ * Rest: -1.734723475976807e-17
+ * Negative sequences: TODO
+ */
+static const PRUint8 LatvianLangModel[] =
+{
+  2,3,3,3,3,3,3,3,2,3,2,3,3,3,3,3,3,3,2,3,3,2,3,3,3,3,3,0,3,3,2,2,3,2,2,2,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,2,3,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_4_CharToOrderMap,
+  LatvianLangModel,
+  39,
+  (float)0.9904102202220861,
+  PR_TRUE,
+  "ISO-8859-4"
+};
+
+const SequenceModel Iso_8859_10LatvianModel =
+{
+  Iso_8859_10_CharToOrderMap,
+  LatvianLangModel,
+  39,
+  (float)0.9904102202220861,
+  PR_TRUE,
+  "ISO-8859-10"
+};
+
+const SequenceModel Iso_8859_13LatvianModel =
+{
+  Iso_8859_13_CharToOrderMap,
+  LatvianLangModel,
+  39,
+  (float)0.9904102202220861,
+  PR_TRUE,
+  "ISO-8859-13"
+};

+ 206 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangLithuanianModel.cpp

@@ -0,0 +1,206 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Lithuanian *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-21 00:25:34.775158
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_10_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 18, 23, 12,  4, 25, 16, 26,  0, 14,  9, 10, 11,  6,  3, /* 4X */
+   15, 37,  5,  2,  7,  8, 13, 33, 32, 19, 27,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 18, 23, 12,  4, 25, 16, 26,  0, 14,  9, 10, 11,  6,  3, /* 6X */
+   15, 37,  5,  2,  7,  8, 13, 33, 32, 19, 27,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 29, 50, 60, 47, 61, 62,SYM, 56, 55, 21, 63, 22,SYM, 28, 64, /* AX */
+  SYM, 29, 50, 65, 47, 66, 67,SYM, 56, 55, 21, 68, 22, 69, 28, 70, /* BX */
+   41, 39, 71, 53, 38, 43, 72, 30, 24, 36, 31, 73, 17, 40, 74, 46, /* CX */
+   75, 57, 34, 44, 59, 76, 35, 77, 48, 20, 54, 78, 45, 79, 80, 52, /* DX */
+   41, 39, 81, 53, 38, 43, 82, 30, 24, 36, 31, 83, 17, 40, 84, 46, /* EX */
+   85, 57, 34, 44, 59, 86, 35, 87, 48, 20, 54, 88, 45, 89, 90, 91, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_4_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 18, 23, 12,  4, 25, 16, 26,  0, 14,  9, 10, 11,  6,  3, /* 4X */
+   15, 37,  5,  2,  7,  8, 13, 33, 32, 19, 27,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 18, 23, 12,  4, 25, 16, 26,  0, 14,  9, 10, 11,  6,  3, /* 6X */
+   15, 37,  5,  2,  7,  8, 13, 33, 32, 19, 27,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 29, 92, 93,SYM, 94, 56,SYM,SYM, 21, 50, 95, 96,SYM, 22,SYM, /* AX */
+  SYM, 29,SYM, 97,SYM, 98, 56,SYM,SYM, 21, 50, 99,100,101, 22,102, /* BX */
+   41, 39,103, 53, 38, 43,104, 30, 24, 36, 31,105, 17, 40,106, 47, /* CX */
+   55, 57, 34,107, 59,108, 35,SYM, 48, 20, 54,109, 45,110, 28, 52, /* DX */
+   41, 39,111, 53, 38, 43,112, 30, 24, 36, 31,113, 17, 40,114, 47, /* EX */
+   55, 57, 34,115, 59,116, 35,SYM, 48, 20, 54,117, 45,118, 28,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_13_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 18, 23, 12,  4, 25, 16, 26,  0, 14,  9, 10, 11,  6,  3, /* 4X */
+   15, 37,  5,  2,  7,  8, 13, 33, 32, 19, 27,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 18, 23, 12,  4, 25, 16, 26,  0, 14,  9, 10, 11,  6,  3, /* 6X */
+   15, 37,  5,  2,  7,  8, 13, 33, 32, 19, 27,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 48,SYM,119,SYM,SYM,SYM,SYM,120, /* AX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 48,SYM,121,SYM,SYM,SYM,SYM,122, /* BX */
+   29, 30, 41, 49, 38, 43, 31, 50, 24, 36,123, 17,124,125, 47, 56, /* CX */
+   21, 51, 57, 44, 34,126, 35,SYM, 20, 42, 58, 28, 45,127, 22, 52, /* DX */
+   29, 30, 41, 49, 38, 43, 31, 50, 24, 36,128, 17,129,130, 47, 56, /* EX */
+   21, 51, 57, 44, 34,131, 35,SYM, 20, 42, 58, 28, 45,132, 22,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 1016
+ * First 512 sequences: 0.9928710196247589
+ * Next 512 sequences (512-1024): 0.0071289803752411715
+ * Rest: -4.85722573273506e-17
+ * Negative sequences: TODO
+ */
+static const PRUint8 LithuanianLangModel[] =
+{
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,3,3,3,3,3,3,3,0,2,3,2,2,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,0,3,3,3,3,3,3,3,0,0,0,0,2,2,0,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,2,0,3,3,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2,0,3,0,0,3,0,0,0,0,0,0,0,0,0,0,
+  0,0,3,0,0,2,0,0,0,2,2,2,0,2,3,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,2,3,0,0,3,0,3,0,3,3,2,2,3,2,3,3,2,0,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  3,2,0,0,2,2,0,2,2,0,0,0,0,3,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,
+  3,3,2,2,3,2,2,0,2,0,2,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,
+  2,0,2,0,2,0,2,0,0,2,0,2,2,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,2,0,0,2,2,2,0,2,2,2,2,0,0,0,2,0,0,0,0,0,0,2,0,2,0,2,0,0,0,0,0,0,0,0,0,0,
+  0,0,2,0,0,2,2,0,0,0,0,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Iso_8859_10LithuanianModel =
+{
+  Iso_8859_10_CharToOrderMap,
+  LithuanianLangModel,
+  38,
+  (float)0.9928710196247589,
+  PR_TRUE,
+  "ISO-8859-10"
+};
+
+const SequenceModel Iso_8859_4LithuanianModel =
+{
+  Iso_8859_4_CharToOrderMap,
+  LithuanianLangModel,
+  38,
+  (float)0.9928710196247589,
+  PR_TRUE,
+  "ISO-8859-4"
+};
+
+const SequenceModel Iso_8859_13LithuanianModel =
+{
+  Iso_8859_13_CharToOrderMap,
+  LithuanianLangModel,
+  38,
+  (float)0.9928710196247589,
+  PR_TRUE,
+  "ISO-8859-13"
+};

+ 137 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangMalteseModel.cpp

@@ -0,0 +1,137 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Maltese *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-21 02:07:45.509404
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_3_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 15, 28, 13,  4, 16, 19, 22,  1,  9, 12,  3, 10,  5,  8, /* 4X */
+   14, 27,  6, 11,  2,  7, 26, 18, 25, 30, 20,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 15, 28, 13,  4, 16, 19, 22,  1,  9, 12,  3, 10,  5,  8, /* 6X */
+   14, 27,  6, 11,  2,  7, 26, 18, 25, 30, 20,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 17,SYM,SYM,SYM,ILL, 48,SYM,SYM, 49, 50, 51, 52,SYM,ILL, 21, /* AX */
+  SYM, 17,SYM,SYM,SYM,SYM, 53,SYM,SYM, 54, 55, 56, 57,SYM,ILL, 21, /* BX */
+   29, 36, 47,ILL, 58, 24, 59, 40, 33, 31, 60, 39, 45, 35, 61, 62, /* CX */
+  ILL, 37, 32, 34, 44, 23, 38,SYM, 63, 43, 42, 64, 46, 65, 66, 41, /* DX */
+   29, 36, 47,ILL, 67, 24, 68, 40, 33, 31, 69, 39, 45, 35, 70, 71, /* EX */
+  ILL, 37, 32, 34, 44, 23, 38,SYM, 72, 43, 42, 73, 46, 74, 75,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 870
+ * First 512 sequences: 0.9959115850692665
+ * Next 512 sequences (512-1024): 0.004088414930733575
+ * Rest: -4.423544863740858e-17
+ * Negative sequences: TODO
+ */
+static const PRUint8 MalteseLangModel[] =
+{
+  3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,0,2,3,3,3,3,3,2,0,3,0,0,3,3,3,2,3,3,
+  3,3,3,3,3,2,2,3,3,3,3,3,3,3,2,3,3,2,3,3,2,0,3,3,0,3,3,3,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,
+  3,3,3,3,3,3,2,3,3,3,2,3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,3,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,3,3,2,3,3,3,3,3,2,3,0,3,
+  3,3,3,3,3,3,3,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,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0,0,0,0,3,0,0,0,0,0,0,
+  3,3,3,3,3,2,3,3,3,3,3,0,2,2,0,3,2,0,2,0,0,0,3,0,0,3,2,0,2,0,0,
+  3,3,0,2,3,2,3,3,3,3,0,2,0,3,2,0,0,0,0,0,0,0,0,0,0,0,3,0,2,0,2,
+  3,3,3,2,3,0,3,3,3,3,2,3,2,3,0,3,3,0,3,3,0,0,2,2,2,2,0,3,0,2,0,
+  3,3,3,3,3,0,2,2,3,2,0,3,3,3,0,2,3,0,0,0,2,0,3,0,0,0,0,2,2,0,2,
+  0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,2,0,0,0,0,0,0,0,2,0,2,0,2,
+};
+
+
+const SequenceModel Iso_8859_3MalteseModel =
+{
+  Iso_8859_3_CharToOrderMap,
+  MalteseLangModel,
+  31,
+  (float)0.9959115850692665,
+  PR_TRUE,
+  "ISO-8859-3"
+};

+ 298 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangPolishModel.cpp

@@ -0,0 +1,298 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Polish *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-21 17:21:04.405363
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Ibm852_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 4X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 6X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,CTR, /* 7X */
+   47, 39, 34, 54, 40, 78, 30, 47, 19, 58, 49, 49, 77, 32, 40, 30, /* 8X */
+   34, 79, 80, 55, 38, 74, 74, 28, 28, 38, 39, 76, 76, 19,SYM, 44, /* 9X */
+   35, 37, 24, 51, 25, 25, 45, 45, 23, 23,SYM, 32, 44, 56,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 35, 54, 46, 56,SYM,SYM,SYM,SYM, 27, 27,SYM, /* BX */
+  SYM,SYM,SYM,SYM,SYM,SYM, 53, 53,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* CX */
+   70, 70, 69, 58, 69, 81, 37, 77, 46,SYM,SYM,SYM,SYM, 65, 82,SYM, /* DX */
+   24, 57, 55, 29, 29, 83, 41, 41, 84, 51, 85, 86, 60, 60, 65,SYM, /* EX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 87, 50, 50,SYM,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_16_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 4X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 6X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 25, 25, 19,SYM,SYM, 41,SYM, 41,SYM, 62,SYM, 32,SYM, 32, 27, /* AX */
+  SYM,SYM, 44, 19, 45,SYM,SYM,SYM, 45, 44, 62,SYM, 75, 75, 88, 27, /* BX */
+   61, 35, 54, 53, 40, 30, 89, 47, 43, 34, 64, 58, 90, 37, 77, 91, /* CX */
+   70, 29, 66, 24, 55, 49, 38, 28, 92, 68, 51, 93, 39, 23, 72, 57, /* DX */
+   61, 35, 54, 53, 40, 30, 94, 47, 43, 34, 64, 58, 95, 37, 77, 96, /* EX */
+   70, 29, 66, 24, 55, 49, 38, 28, 97, 68, 51, 98, 39, 23, 72, 99, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_2_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 4X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 6X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 25,SYM, 19,SYM, 74, 28,SYM,SYM, 41, 56, 76, 32,SYM, 45, 27, /* AX */
+  SYM, 25,SYM, 19,SYM, 74, 28,SYM,SYM, 41, 56, 76, 32,SYM, 45, 27, /* BX */
+  100, 35, 54, 53, 40,101, 30, 47, 44, 34, 23, 58, 46, 37, 77, 69, /* CX */
+   70, 29,102, 24, 55, 49, 38,SYM, 50,103, 51,104, 39, 60, 65, 57, /* DX */
+  105, 35, 54, 53, 40,106, 30, 47, 44, 34, 23, 58, 46, 37, 77, 69, /* EX */
+   70, 29,107, 24, 55, 49, 38,SYM, 50,108, 51,109, 39, 60, 65,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Mac_Centraleurope_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 4X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 6X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,CTR, /* 7X */
+   40, 63, 63, 34, 25, 38, 39, 35, 25, 44, 40, 44, 30, 30, 34, 32, /* 8X */
+   32, 69, 37, 69,110,111, 71, 24, 71, 55, 38, 67, 51, 46, 46, 39, /* 9X */
+  SYM,SYM, 23,SYM,SYM,SYM,SYM, 57,SYM,SYM,SYM, 23,SYM,SYM,112,113, /* AX */
+  114, 73,SYM,SYM, 73,115,SYM,SYM, 19,116,117, 74, 74,118,119,120, /* BX */
+  121, 29,SYM,SYM, 29,122,SYM,SYM,SYM,SYM,SYM,123, 49, 67, 49, 42, /* CX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 42,124,125, 50,SYM,SYM, 50,126, /* DX */
+  127, 41,SYM,SYM, 41, 28, 28, 35, 76, 76, 37, 45, 45, 59, 24, 55, /* EX */
+   59,128, 51,129,130,131,132,133, 60, 60,134, 27, 19, 27,135,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_13_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 4X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 6X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 48,SYM,136,SYM,SYM,SYM,SYM,137, /* AX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 48,SYM,138,SYM,SYM,SYM,SYM,139, /* BX */
+   25,140, 63, 30, 40, 52, 23,141, 44, 34, 32, 71,142,143, 73,144, /* CX */
+   41, 29,145, 24, 42, 67, 38,SYM,146, 19, 28, 59, 39, 27, 45, 57, /* DX */
+   25,147, 63, 30, 40, 52, 23,148, 44, 34, 32, 71,149,150, 73,151, /* EX */
+   41, 29,152, 24, 42, 67, 38,SYM,153, 19, 28, 59, 39, 27, 45,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1250_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 4X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 20, 11, 14,  3, 26, 21, 22,  1, 18,  7, 15, 16,  5,  2, /* 6X */
+   13, 36,  4,  6, 10, 17, 31,  9, 33, 12,  8,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,ILL,SYM,SYM,SYM,SYM,ILL,SYM, 41,SYM, 28, 76, 45, 32, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,ILL,SYM, 41,SYM, 28, 76, 45, 32, /* 9X */
+  SYM,SYM,SYM, 19,SYM, 25,SYM,SYM,SYM,SYM, 56,SYM,SYM,SYM,SYM, 27, /* AX */
+  SYM,SYM,SYM, 19,SYM,SYM,SYM,SYM,SYM, 25, 56,SYM, 74,SYM, 74, 27, /* BX */
+  154, 35, 54, 53, 40,155, 30, 47, 44, 34, 23, 58, 46, 37, 77, 69, /* CX */
+   70, 29,156, 24, 55, 49, 38,SYM, 50,157, 51,158, 39, 60, 65, 57, /* DX */
+  159, 35, 54, 53, 40,160, 30, 47, 44, 34, 23, 58, 46, 37, 77, 69, /* EX */
+   70, 29,161, 24, 55, 49, 38,SYM, 50,162, 51,163, 39, 60, 65,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 1321
+ * First 512 sequences: 0.9894531815946438
+ * Next 512 sequences (512-1024): 0.010193795364991133
+ * Rest: 0.0003530230403650733
+ * Negative sequences: TODO
+ */
+static const PRUint8 PolishLangModel[] =
+{
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,3,3,3,3,3,3,3,2,0,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,2,3,3,3,2,2,2,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,0,0,0,3,3,3,3,2,3,2,2,0,0,1,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,2,2,3,3,3,3,2,3,2,2,0,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,2,3,3,3,2,2,2,0,2,2,0,1,2,2,2,
+  3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,2,2,3,2,1,2,3,2,3,3,3,3,2,0,0,0,2,0,2,2,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,2,3,2,3,3,2,0,0,0,0,2,0,0,2,2,2,
+  3,3,3,3,3,2,3,3,1,3,3,3,2,2,2,3,3,3,2,3,2,2,2,3,3,3,2,3,2,0,0,2,0,1,2,2,0,
+  3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,2,3,3,3,3,3,3,2,3,2,3,1,2,0,0,0,2,0,0,2,2,2,
+  3,3,3,3,3,3,3,3,3,2,2,3,3,3,2,3,2,3,0,3,2,2,2,3,3,3,1,0,2,0,0,0,0,0,1,0,0,
+  3,3,3,3,3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,0,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Ibm852PolishModel =
+{
+  Ibm852_CharToOrderMap,
+  PolishLangModel,
+  37,
+  (float)0.9894531815946438,
+  PR_TRUE,
+  "IBM852"
+};
+
+const SequenceModel Iso_8859_16PolishModel =
+{
+  Iso_8859_16_CharToOrderMap,
+  PolishLangModel,
+  37,
+  (float)0.9894531815946438,
+  PR_TRUE,
+  "ISO-8859-16"
+};
+
+const SequenceModel Iso_8859_2PolishModel =
+{
+  Iso_8859_2_CharToOrderMap,
+  PolishLangModel,
+  37,
+  (float)0.9894531815946438,
+  PR_TRUE,
+  "ISO-8859-2"
+};
+
+const SequenceModel Mac_CentraleuropePolishModel =
+{
+  Mac_Centraleurope_CharToOrderMap,
+  PolishLangModel,
+  37,
+  (float)0.9894531815946438,
+  PR_TRUE,
+  "MAC-CENTRALEUROPE"
+};
+
+const SequenceModel Iso_8859_13PolishModel =
+{
+  Iso_8859_13_CharToOrderMap,
+  PolishLangModel,
+  37,
+  (float)0.9894531815946438,
+  PR_TRUE,
+  "ISO-8859-13"
+};
+
+const SequenceModel Windows_1250PolishModel =
+{
+  Windows_1250_CharToOrderMap,
+  PolishLangModel,
+  37,
+  (float)0.9894531815946438,
+  PR_TRUE,
+  "WINDOWS-1250"
+};

+ 237 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangPortugueseModel.cpp

@@ -0,0 +1,237 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Portuguese *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-20 23:47:27.348423
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_1_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 17, 10,  7,  1, 16, 14, 18,  4, 28, 34, 12,  9,  6,  2, /* 4X */
+   13, 21,  5,  3,  8, 11, 15, 32, 24, 31, 26,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 17, 10,  7,  1, 16, 14, 18,  4, 28, 34, 12,  9,  6,  2, /* 6X */
+   13, 21,  5,  3,  8, 11, 15, 32, 24, 31, 26,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 51,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   36, 25, 35, 20, 41, 42, 43, 22, 39, 19, 29, 44, 52, 23, 45, 47, /* CX */
+   48, 53, 46, 27, 37, 30, 38,SYM, 54, 55, 33, 56, 40, 57, 58, 49, /* DX */
+   36, 25, 35, 20, 41, 42, 43, 22, 39, 19, 29, 44, 59, 23, 45, 47, /* EX */
+   48, 60, 46, 27, 37, 30, 38,SYM, 61, 62, 33, 63, 40, 64, 65, 50, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_9_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 17, 10,  7,  1, 16, 14, 18,  4, 28, 34, 12,  9,  6,  2, /* 4X */
+   13, 21,  5,  3,  8, 11, 15, 32, 24, 31, 26,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 17, 10,  7,  1, 16, 14, 18,  4, 28, 34, 12,  9,  6,  2, /* 6X */
+   13, 21,  5,  3,  8, 11, 15, 32, 24, 31, 26,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 66,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   36, 25, 35, 20, 41, 42, 43, 22, 39, 19, 29, 44, 67, 23, 45, 47, /* CX */
+   68, 69, 46, 27, 37, 30, 38,SYM, 70, 71, 33, 72, 40, 73, 74, 49, /* DX */
+   36, 25, 35, 20, 41, 42, 43, 22, 39, 19, 29, 44, 75, 23, 45, 47, /* EX */
+   76, 77, 46, 27, 37, 30, 38,SYM, 78, 79, 33, 80, 40, 81, 82, 50, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_15_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 17, 10,  7,  1, 16, 14, 18,  4, 28, 34, 12,  9,  6,  2, /* 4X */
+   13, 21,  5,  3,  8, 11, 15, 32, 24, 31, 26,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 17, 10,  7,  1, 16, 14, 18,  4, 28, 34, 12,  9,  6,  2, /* 6X */
+   13, 21,  5,  3,  8, 11, 15, 32, 24, 31, 26,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM, 83,SYM, 84,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM, 85, 86,SYM,SYM, 87,SYM,SYM,SYM, 88, 89, 50,SYM, /* BX */
+   36, 25, 35, 20, 41, 42, 43, 22, 39, 19, 29, 44, 90, 23, 45, 47, /* CX */
+   48, 91, 46, 27, 37, 30, 38,SYM, 92, 93, 33, 94, 40, 95, 96, 49, /* DX */
+   36, 25, 35, 20, 41, 42, 43, 22, 39, 19, 29, 44, 97, 23, 45, 47, /* EX */
+   48, 98, 46, 27, 37, 30, 38,SYM, 99,100, 33,101, 40,102,103, 50, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1252_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 17, 10,  7,  1, 16, 14, 18,  4, 28, 34, 12,  9,  6,  2, /* 4X */
+   13, 21,  5,  3,  8, 11, 15, 32, 24, 31, 26,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 17, 10,  7,  1, 16, 14, 18,  4, 28, 34, 12,  9,  6,  2, /* 6X */
+   13, 21,  5,  3,  8, 11, 15, 32, 24, 31, 26,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,104,SYM,SYM,SYM,SYM,SYM,SYM,105,SYM,106,ILL,107,ILL, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,108,SYM,109,ILL,110, 50, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM,111,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   36, 25, 35, 20, 41, 42, 43, 22, 39, 19, 29, 44,112, 23, 45, 47, /* CX */
+   48,113, 46, 27, 37, 30, 38,SYM,114,115, 33,116, 40,117,118, 49, /* DX */
+   36, 25, 35, 20, 41, 42, 43, 22, 39, 19, 29, 44,119, 23, 45, 47, /* EX */
+   48,120, 46, 27, 37, 30, 38,SYM,121,122, 33,123, 40,124,125, 50, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 891
+ * First 512 sequences: 0.9953179582313172
+ * Next 512 sequences (512-1024): 0.0046820417686827855
+ * Rest: 2.42861286636753e-17
+ * Negative sequences: TODO
+ */
+static const PRUint8 PortugueseLangModel[] =
+{
+  2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,3,3,3,3,0,3,2,3,0,0,3,2,2,3,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,0,2,3,3,2,3,2,3,2,3,0,2,3,3,2,2,2,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,3,2,3,2,3,2,3,0,2,3,3,0,3,0,0,0,
+  3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,3,0,3,0,3,2,3,0,2,3,3,2,2,3,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,0,3,3,3,3,2,3,3,2,2,2,3,2,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,3,2,3,3,3,2,2,3,3,0,3,
+  3,3,3,3,3,2,3,3,3,2,3,3,2,2,3,3,3,2,3,3,3,3,3,3,2,3,3,3,3,2,0,3,2,3,3,2,0,3,
+  3,3,3,3,3,3,2,3,2,3,2,3,3,2,3,2,2,2,2,3,3,2,0,3,0,3,0,3,2,3,2,3,3,3,0,2,0,2,
+  3,3,3,3,3,3,3,0,3,3,3,3,3,2,2,2,2,2,3,3,3,0,0,3,0,3,2,3,0,3,2,3,2,2,2,3,0,3,
+  3,3,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+  0,0,0,0,0,0,3,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,2,2,0,0,3,2,2,3,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Iso_8859_1PortugueseModel =
+{
+  Iso_8859_1_CharToOrderMap,
+  PortugueseLangModel,
+  38,
+  (float)0.9953179582313172,
+  PR_TRUE,
+  "ISO-8859-1"
+};
+
+const SequenceModel Iso_8859_9PortugueseModel =
+{
+  Iso_8859_9_CharToOrderMap,
+  PortugueseLangModel,
+  38,
+  (float)0.9953179582313172,
+  PR_TRUE,
+  "ISO-8859-9"
+};
+
+const SequenceModel Iso_8859_15PortugueseModel =
+{
+  Iso_8859_15_CharToOrderMap,
+  PortugueseLangModel,
+  38,
+  (float)0.9953179582313172,
+  PR_TRUE,
+  "ISO-8859-15"
+};
+
+const SequenceModel Windows_1252PortugueseModel =
+{
+  Windows_1252_CharToOrderMap,
+  PortugueseLangModel,
+  38,
+  (float)0.9953179582313172,
+  PR_TRUE,
+  "WINDOWS-1252"
+};

+ 232 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangRomanianModel.cpp

@@ -0,0 +1,232 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Romanian *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-28 18:58:13.757152
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_16_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  2, 17,  9, 11,  0, 16, 15, 23,  1, 26, 27,  6, 12,  4,  8, /* 4X */
+   13, 32,  3, 10,  5,  7, 21, 29, 25, 28, 22,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  2, 17,  9, 11,  0, 16, 15, 23,  1, 26, 27,  6, 12,  4,  8, /* 6X */
+   13, 32,  3, 10,  5,  7, 21, 29, 25, 28, 22,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 60, 61, 46,SYM,SYM, 38,SYM, 38,SYM, 19,SYM, 62,SYM, 63, 64, /* AX */
+  SYM,SYM, 41, 46, 40,SYM,SYM,SYM, 40, 41, 19,SYM, 65, 66, 67, 68, /* BX */
+   69, 30, 24, 14, 33, 35, 53, 42, 45, 31, 58, 49, 70, 37, 20, 48, /* CX */
+   43, 52, 59, 34, 71, 44, 36, 56, 50, 72, 47, 73, 39, 74, 18, 57, /* DX */
+   75, 30, 24, 14, 33, 35, 53, 42, 45, 31, 58, 49, 76, 37, 20, 48, /* EX */
+   43, 52, 59, 34, 77, 44, 36, 56, 50, 78, 47, 79, 39, 80, 18, 81, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_2_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  2, 17,  9, 11,  0, 16, 15, 23,  1, 26, 27,  6, 12,  4,  8, /* 4X */
+   13, 32,  3, 10,  5,  7, 21, 29, 25, 28, 22,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  2, 17,  9, 11,  0, 16, 15, 23,  1, 26, 27,  6, 12,  4,  8, /* 6X */
+   13, 32,  3, 10,  5,  7, 21, 29, 25, 28, 22,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 82,SYM, 46,SYM, 83, 56,SYM,SYM, 38, 84, 85, 86,SYM, 40, 87, /* AX */
+  SYM, 88,SYM, 46,SYM, 89, 56,SYM,SYM, 38, 90, 91, 92,SYM, 40, 93, /* BX */
+   94, 30, 24, 14, 33, 95, 35, 42, 41, 31, 96, 49, 51, 37, 20, 97, /* CX */
+   43, 52, 98, 34, 99, 44, 36,SYM, 55,100, 47, 50, 39, 54,101, 57, /* DX */
+  102, 30, 24, 14, 33,103, 35, 42, 41, 31,104, 49, 51, 37, 20,105, /* EX */
+   43, 52,106, 34,107, 44, 36,SYM, 55,108, 47, 50, 39, 54,109,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1250_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  2, 17,  9, 11,  0, 16, 15, 23,  1, 26, 27,  6, 12,  4,  8, /* 4X */
+   13, 32,  3, 10,  5,  7, 21, 29, 25, 28, 22,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  2, 17,  9, 11,  0, 16, 15, 23,  1, 26, 27,  6, 12,  4,  8, /* 6X */
+   13, 32,  3, 10,  5,  7, 21, 29, 25, 28, 22,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,ILL,SYM,SYM,SYM,SYM,ILL,SYM, 38,SYM, 56,110, 40,111, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,ILL,SYM, 38,SYM, 56,112, 40,113, /* 9X */
+  SYM,SYM,SYM, 46,SYM,114,SYM,SYM,SYM,SYM,115,SYM,SYM,SYM,SYM,116, /* AX */
+  SYM,SYM,SYM, 46,SYM,SYM,SYM,SYM,SYM,117,118,SYM,119,SYM,120,121, /* BX */
+  122, 30, 24, 14, 33,123, 35, 42, 41, 31,124, 49, 51, 37, 20,125, /* CX */
+   43, 52,126, 34,127, 44, 36,SYM, 55,128, 47, 50, 39, 54,129, 57, /* DX */
+  130, 30, 24, 14, 33,131, 35, 42, 41, 31,132, 49, 51, 37, 20,133, /* EX */
+   43, 52,134, 34,135, 44, 36,SYM, 55,136, 47, 50, 39, 54,137,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Ibm852_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  2, 17,  9, 11,  0, 16, 15, 23,  1, 26, 27,  6, 12,  4,  8, /* 4X */
+   13, 32,  3, 10,  5,  7, 21, 29, 25, 28, 22,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  2, 17,  9, 11,  0, 16, 15, 23,  1, 26, 27,  6, 12,  4,  8, /* 6X */
+   13, 32,  3, 10,  5,  7, 21, 29, 25, 28, 22,SYM,SYM,SYM,SYM,CTR, /* 7X */
+   42, 39, 31, 24, 33,138, 35, 42, 46, 49, 44, 44, 20,139, 33, 35, /* 8X */
+   31,140,141,142, 36,143,144, 56, 56, 36, 39,145,146, 46,SYM, 41, /* 9X */
+   30, 37, 34, 47,147,148, 40, 40,149,150,SYM,151, 41,152,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 30, 24, 51,153,SYM,SYM,SYM,SYM,154,155,SYM, /* BX */
+  SYM,SYM,SYM,SYM,SYM,SYM, 14, 14,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* CX */
+   43, 43,156, 49,157,158, 37, 20, 51,SYM,SYM,SYM,SYM,159,160,SYM, /* DX */
+   34, 57,161, 52, 52,162, 38, 38,163, 47,164, 50, 54, 54,165,SYM, /* EX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 50, 55, 55,SYM,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 981
+ * First 512 sequences: 0.997762564143313
+ * Next 512 sequences (512-1024): 0.002237435856687006
+ * Rest: 3.0357660829594124e-18
+ * Negative sequences: TODO
+ */
+static const PRUint8 RomanianLangModel[] =
+{
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,0,3,3,3,2,3,3,3,2,2,0,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,0,3,3,3,0,3,3,3,3,3,0,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,2,2,3,3,2,2,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,0,3,3,3,3,2,3,3,3,3,2,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,2,3,3,0,2,2,3,3,3,3,0,2,2,3,3,2,3,0,
+  3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,2,2,3,0,3,3,3,2,2,2,0,
+  3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,2,2,0,2,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,0,3,3,3,0,3,2,3,3,3,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,2,2,3,2,0,3,2,3,3,0,3,3,2,2,0,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,0,2,2,3,3,3,0,2,3,3,3,2,2,2,
+  3,3,3,3,3,2,3,3,3,2,3,3,3,2,3,3,2,3,0,0,0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0,0,2,0,0,0,2,0,0,2,0,0,2,0,0,2,0,0,
+  3,3,3,3,2,3,3,3,3,2,3,2,3,2,2,2,2,2,2,2,2,2,0,3,0,0,0,2,3,2,2,2,0,
+  3,2,3,3,3,2,3,2,3,3,3,3,3,2,0,2,0,2,0,0,0,2,2,2,0,0,2,2,0,2,2,0,0,
+  3,3,3,2,3,2,2,2,3,2,3,2,2,2,0,0,2,2,0,0,0,0,0,3,0,0,0,0,2,3,0,0,0,
+  2,3,0,3,3,2,2,0,0,2,2,2,2,0,0,2,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,
+  0,3,2,2,2,2,2,0,0,2,2,2,2,2,0,2,0,2,0,0,0,2,2,0,0,0,2,2,0,0,0,0,0,
+  0,0,2,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,
+};
+
+
+const SequenceModel Iso_8859_16RomanianModel =
+{
+  Iso_8859_16_CharToOrderMap,
+  RomanianLangModel,
+  33,
+  (float)0.997762564143313,
+  PR_TRUE,
+  "ISO-8859-16"
+};
+
+const SequenceModel Iso_8859_2RomanianModel =
+{
+  Iso_8859_2_CharToOrderMap,
+  RomanianLangModel,
+  33,
+  (float)0.997762564143313,
+  PR_TRUE,
+  "ISO-8859-2"
+};
+
+const SequenceModel Windows_1250RomanianModel =
+{
+  Windows_1250_CharToOrderMap,
+  RomanianLangModel,
+  33,
+  (float)0.997762564143313,
+  PR_TRUE,
+  "WINDOWS-1250"
+};
+
+const SequenceModel Ibm852RomanianModel =
+{
+  Ibm852_CharToOrderMap,
+  RomanianLangModel,
+  33,
+  (float)0.997762564143313,
+  PR_TRUE,
+  "IBM852"
+};

+ 289 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangRussianModel.cpp

@@ -0,0 +1,289 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Slovak *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-21 13:33:10.331339
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Ibm852_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 20, 15, 11,  2, 29, 30, 17,  4, 18,  7, 10, 12,  3,  0, /* 4X */
+   13, 40,  6,  8,  5, 14,  9, 37, 34, 19, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 20, 15, 11,  2, 29, 30, 17,  4, 18,  7, 10, 12,  3,  0, /* 6X */
+   13, 40,  6,  8,  5, 14,  9, 37, 34, 19, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+   51, 46, 25, 62, 38, 48, 47, 51, 49, 54, 50, 50, 63, 64, 38, 47, /* 8X */
+   25, 42, 42, 32, 43, 33, 33, 65, 66, 43, 46, 31, 31, 49,SYM, 24, /* 9X */
+   21, 23, 35, 27, 67, 68, 26, 26, 69, 70,SYM, 71, 24, 59,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 21, 72, 41, 59,SYM,SYM,SYM,SYM, 61, 61,SYM, /* BX */
+  SYM,SYM,SYM,SYM,SYM,SYM, 56, 56,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* CX */
+   55, 55, 39, 54, 39, 36, 23, 73, 41,SYM,SYM,SYM,SYM, 74, 48,SYM, /* DX */
+   35, 58, 32, 52, 52, 36, 28, 28, 44, 27, 44, 60, 22, 22, 75,SYM, /* EX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 60, 45, 45,SYM,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_2_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 20, 15, 11,  2, 29, 30, 17,  4, 18,  7, 10, 12,  3,  0, /* 4X */
+   13, 40,  6,  8,  5, 14,  9, 37, 34, 19, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 20, 15, 11,  2, 29, 30, 17,  4, 18,  7, 10, 12,  3,  0, /* 6X */
+   13, 40,  6,  8,  5, 14,  9, 37, 34, 19, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 76,SYM, 49,SYM, 33, 77,SYM,SYM, 28, 59, 31, 78,SYM, 26, 61, /* AX */
+  SYM, 79,SYM, 49,SYM, 33, 80,SYM,SYM, 28, 59, 31, 81,SYM, 26, 61, /* BX */
+   44, 21, 82, 56, 38, 42, 47, 51, 24, 25, 83, 54, 41, 23, 84, 39, /* CX */
+   55, 52, 36, 35, 32, 50, 43,SYM, 45, 48, 27, 60, 46, 22, 85, 58, /* DX */
+   44, 21, 86, 56, 38, 42, 47, 51, 24, 25, 87, 54, 41, 23, 88, 39, /* EX */
+   55, 52, 36, 35, 32, 50, 43,SYM, 45, 48, 27, 60, 46, 22, 89,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Mac_Centraleurope_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 20, 15, 11,  2, 29, 30, 17,  4, 18,  7, 10, 12,  3,  0, /* 4X */
+   13, 40,  6,  8,  5, 14,  9, 37, 34, 19, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 20, 15, 11,  2, 29, 30, 17,  4, 18,  7, 10, 12,  3,  0, /* 6X */
+   13, 40,  6,  8,  5, 14,  9, 37, 34, 19, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+   38, 90, 91, 25, 92, 43, 46, 21, 93, 24, 38, 24, 47, 47, 25, 94, /* 8X */
+   95, 39, 23, 39, 96, 97, 98, 35, 99, 32, 43,100, 27, 41, 41, 46, /* 9X */
+  SYM,SYM,101,SYM,SYM,SYM,SYM, 58,SYM,SYM,SYM,102,SYM,SYM,103,104, /* AX */
+  105, 57,SYM,SYM, 57,106,SYM,SYM, 49,107,108, 33, 33, 42, 42,109, /* BX */
+  110, 52,SYM,SYM, 52, 36,SYM,SYM,SYM,SYM,SYM, 36, 50,111, 50, 53, /* CX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 53, 44, 44, 45,SYM,SYM, 45,112, /* DX */
+  113, 28,SYM,SYM, 28,114,115, 21, 31, 31, 23, 26, 26,116, 35, 32, /* EX */
+  117, 48, 27, 48, 60, 60,118,119, 22, 22,120, 61, 49, 61,121,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1250_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  1, 20, 15, 11,  2, 29, 30, 17,  4, 18,  7, 10, 12,  3,  0, /* 4X */
+   13, 40,  6,  8,  5, 14,  9, 37, 34, 19, 16,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  1, 20, 15, 11,  2, 29, 30, 17,  4, 18,  7, 10, 12,  3,  0, /* 6X */
+   13, 40,  6,  8,  5, 14,  9, 37, 34, 19, 16,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,ILL,SYM,SYM,SYM,SYM,ILL,SYM, 28,SYM,122, 31, 26,123, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,ILL,SYM, 28,SYM,124, 31, 26,125, /* 9X */
+  SYM,SYM,SYM, 49,SYM,126,SYM,SYM,SYM,SYM, 59,SYM,SYM,SYM,SYM, 61, /* AX */
+  SYM,SYM,SYM, 49,SYM,SYM,SYM,SYM,SYM,127, 59,SYM, 33,SYM, 33, 61, /* BX */
+   44, 21,128, 56, 38, 42, 47, 51, 24, 25,129, 54, 41, 23,130, 39, /* CX */
+   55, 52, 36, 35, 32, 50, 43,SYM, 45, 48, 27, 60, 46, 22,131, 58, /* DX */
+   44, 21,132, 56, 38, 42, 47, 51, 24, 25,133, 54, 41, 23,134, 39, /* EX */
+   55, 52, 36, 35, 32, 50, 43,SYM, 45, 48, 27, 60, 46, 22,135,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 1181
+ * First 512 sequences: 0.9733303573968434
+ * Next 512 sequences (512-1024): 0.026317344239265295
+ * Rest: 0.0003522983638913346
+ * Negative sequences: TODO
+ */
+static const PRUint8 SlovakLangModel[] =
+{
+  2,2,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,
+   0,0,3,2,3,1,2,3,3,1,0,3,2,0,3,2,0,1,2,0,0,0,0,
+  2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,
+   0,0,3,0,3,0,3,3,3,3,0,2,3,1,2,2,0,2,2,0,0,0,0,
+  3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,
+   0,2,3,0,3,2,3,3,3,2,0,3,3,3,3,2,0,3,2,0,0,1,0,
+  3,3,3,3,3,3,2,3,3,2,2,3,2,2,3,3,2,2,2,3,2,3,
+   3,3,3,3,2,3,3,2,3,0,2,0,0,2,0,2,0,0,2,2,0,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,
+   0,3,3,2,3,0,3,3,3,3,0,2,2,3,2,2,0,0,2,0,0,0,0,
+  3,3,3,3,3,2,3,3,3,3,3,1,3,2,3,2,3,3,2,3,2,3,
+   3,3,2,3,0,3,2,2,2,1,0,2,0,3,2,2,2,2,1,2,1,1,2,
+  3,3,3,3,3,3,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1,1,0,0,0,2,0,0,0,2,2,0,0,0,2,0,
+   0,0,3,0,0,0,0,0,2,2,0,0,0,0,0,0,2,0,0,0,0,0,0,
+  2,3,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,
+   0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,0,0,0,2,0,0,1,0,0,0,0,2,0,0,0,0,0,0,2,
+   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,2,0,2,2,2,0,0,1,0,1,0,0,1,2,0,2,0,0,0,
+   0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,
+   0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
+  0,0,0,2,0,2,2,0,2,0,1,2,1,0,0,0,0,2,0,0,2,0,
+   0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,2,0,0,0,0,
+   0,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Ibm852SlovakModel =
+{
+  Ibm852_CharToOrderMap,
+  SlovakLangModel,
+  45,
+  (float)0.9733303573968434,
+  PR_TRUE,
+  "IBM852"
+};
+
+const SequenceModel Iso_8859_2SlovakModel =
+{
+  Iso_8859_2_CharToOrderMap,
+  SlovakLangModel,
+  45,
+  (float)0.9733303573968434,
+  PR_TRUE,
+  "ISO-8859-2"
+};
+
+const SequenceModel Mac_CentraleuropeSlovakModel =
+{
+  Mac_Centraleurope_CharToOrderMap,
+  SlovakLangModel,
+  45,
+  (float)0.9733303573968434,
+  PR_TRUE,
+  "MAC-CENTRALEUROPE"
+};
+
+const SequenceModel Windows_1250SlovakModel =
+{
+  Windows_1250_CharToOrderMap,
+  SlovakLangModel,
+  45,
+  (float)0.9733303573968434,
+  PR_TRUE,
+  "WINDOWS-1250"
+};

+ 259 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangSloveneModel.cpp

@@ -0,0 +1,259 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Slovene *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-28 22:06:46.134717
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Iso_8859_2_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 4X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 6X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 41,SYM, 42,SYM, 43, 44,SYM,SYM, 22, 45, 46, 47,SYM, 23, 48, /* AX */
+  SYM, 49,SYM, 50,SYM, 51, 52,SYM,SYM, 22, 53, 54, 55,SYM, 23, 56, /* BX */
+   57, 32, 58, 59, 60, 61, 37, 34, 21, 29, 62, 36, 63, 30, 64, 65, /* CX */
+   66, 67, 68, 31, 35, 69, 70,SYM, 71, 72, 39, 73, 74, 40, 75, 76, /* DX */
+   77, 32, 78, 79, 80, 81, 37, 34, 21, 29, 82, 36, 83, 30, 84, 85, /* EX */
+   86, 87, 88, 31, 35, 89, 90,SYM, 91, 92, 39, 93, 94, 40, 95,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_16_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 4X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 6X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM, 96, 97, 98,SYM,SYM, 22,SYM, 22,SYM, 99,SYM,100,SYM,101,102, /* AX */
+  SYM,SYM, 21,103, 23,SYM,SYM,SYM, 23, 21,104,SYM,105,106,107,108, /* BX */
+  109, 32,110,111,112, 37,113, 34,114, 29, 33, 36,115, 30,116,117, /* CX */
+  118,119,120, 31, 35,121,122,123,124,125, 39,126,127,128,129,130, /* DX */
+  131, 32,132,133,134, 37,135, 34,136, 29, 33, 36,137, 30,138,139, /* EX */
+  140,141,142, 31, 35,143,144,145,146,147, 39,148,149,150,151,152, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Windows_1250_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 4X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 6X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM,ILL,SYM,SYM,SYM,SYM,ILL,SYM, 22,SYM,153,154, 23,155, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,ILL,SYM, 22,SYM,156,157, 23,158, /* 9X */
+  SYM,SYM,SYM,159,SYM,160,SYM,SYM,SYM,SYM,161,SYM,SYM,SYM,SYM,162, /* AX */
+  SYM,SYM,SYM,163,SYM,SYM,SYM,SYM,SYM,164,165,SYM,166,SYM,167,168, /* BX */
+  169, 32,170,171,172,173, 37, 34, 21, 29,174, 36,175, 30,176,177, /* CX */
+  178,179,180, 31, 35,181,182,SYM,183,184, 39,185,186, 40,187,188, /* DX */
+  189, 32,190,191,192,193, 37, 34, 21, 29,194, 36,195, 30,196,197, /* EX */
+  198,199,200, 31, 35,201,202,SYM,203,204, 39,205,206, 40,207,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Mac_Centraleurope_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 4X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 6X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  208,209,210, 29,211,212,213, 32,214, 21,215, 21, 37, 37, 29,216, /* 8X */
+  217,218, 30,219, 38, 38,220, 31,221, 35,222,223, 39,224,225,226, /* 9X */
+  SYM,SYM,227,SYM,SYM,SYM,SYM,228,SYM,SYM,SYM,229,SYM,SYM,230,231, /* AX */
+  232,233,SYM,SYM,234,235,SYM,SYM,236,237,238,239,240,241,242,243, /* BX */
+  244,245,SYM,SYM,246,247,SYM,SYM,SYM,SYM,SYM,248,249,249,249,249, /* CX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,249,249,249,249,SYM,SYM,249,249, /* DX */
+  249, 22,SYM,SYM, 22,249,249, 32,249,249, 30, 23, 23,249, 31, 35, /* EX */
+  249,249, 39,249,249,249,249,249, 40, 40,249,249,249,249,249,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Ibm852_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 4X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 18, 19, 13,  1, 24, 17, 20,  2,  8, 12,  9, 14,  4,  3, /* 6X */
+   11, 28,  5,  6,  7, 16, 10, 27, 25, 26, 15,SYM,SYM,SYM,SYM,CTR, /* 7X */
+   34,249, 29,249,249,249, 37, 34,249, 36,249,249,249,249,249, 37, /* 8X */
+   29,249,249, 35,249,249,249,249,249,249,249,249,249,249,SYM, 21, /* 9X */
+   32, 30, 31, 39,249,249, 23, 23,249,249,SYM,249, 21,249,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 32,249,249,249,SYM,SYM,SYM,SYM,249,249,SYM, /* BX */
+  SYM,SYM,SYM,SYM,SYM,SYM,249,249,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* CX */
+  249,249,249, 36,249,249, 30,249,249,SYM,SYM,SYM,SYM,249,249,SYM, /* DX */
+   31,249, 35,249,249,249, 22, 22,249, 39,249,249, 40, 40,249,SYM, /* EX */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,249,249,249,SYM,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 727
+ * First 512 sequences: 0.9983524317161332
+ * Next 512 sequences (512-1024): 0.0016475682838668457
+ * Rest: -3.859759734048396e-17
+ * Negative sequences: TODO
+ */
+static const PRUint8 SloveneLangModel[] =
+{
+  2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,2,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,2,3,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,
+  3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,2,3,2,3,3,3,2,0,0,3,2,3,3,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,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,2,2,0,3,2,0,2,2,0,0,0,3,2,2,2,0,
+  3,3,3,3,2,2,2,3,0,0,2,3,0,2,2,0,3,2,3,3,2,0,0,0,2,2,2,2,0,
+  3,3,2,3,3,2,3,3,3,3,0,2,2,2,2,0,2,2,2,3,2,0,0,0,0,2,0,2,0,
+  3,3,3,3,3,0,3,0,0,2,0,0,0,0,2,0,2,2,2,0,2,0,0,0,2,0,2,3,0,
+  0,0,0,0,2,0,0,2,0,2,0,0,0,0,0,0,3,0,0,2,0,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Iso_8859_2SloveneModel =
+{
+  Iso_8859_2_CharToOrderMap,
+  SloveneLangModel,
+  29,
+  (float)0.9983524317161332,
+  PR_TRUE,
+  "ISO-8859-2"
+};
+
+const SequenceModel Iso_8859_16SloveneModel =
+{
+  Iso_8859_16_CharToOrderMap,
+  SloveneLangModel,
+  29,
+  (float)0.9983524317161332,
+  PR_TRUE,
+  "ISO-8859-16"
+};
+
+const SequenceModel Windows_1250SloveneModel =
+{
+  Windows_1250_CharToOrderMap,
+  SloveneLangModel,
+  29,
+  (float)0.9983524317161332,
+  PR_TRUE,
+  "WINDOWS-1250"
+};
+
+const SequenceModel Mac_CentraleuropeSloveneModel =
+{
+  Mac_Centraleurope_CharToOrderMap,
+  SloveneLangModel,
+  29,
+  (float)0.9983524317161332,
+  PR_TRUE,
+  "MAC-CENTRALEUROPE"
+};
+
+const SequenceModel Ibm852SloveneModel =
+{
+  Ibm852_CharToOrderMap,
+  SloveneLangModel,
+  29,
+  (float)0.9983524317161332,
+  PR_TRUE,
+  "IBM852"
+};

+ 261 - 0
iOSClient/Library/NCUchardet/src/LangModels/LangSpanishModel.cpp

@@ -0,0 +1,261 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "../nsSBCharSetProber.h"
+
+/********* Language model for: Swedish *********/
+
+/**
+ * Generated by BuildLangModel.py
+ * On: 2016-09-28 22:29:21.480940
+ **/
+
+/* Character Mapping Table:
+ * ILL: illegal character.
+ * CTR: control character specific to the charset.
+ * RET: carriage/return.
+ * SYM: symbol (punctuation) that does not belong to word.
+ * NUM: 0 - 9.
+ *
+ * Other characters are ordered by probabilities
+ * (0 is the most common character in the language).
+ *
+ * Orders are generic to a language. So the codepoint with order X in
+ * CHARSET1 maps to the same character as the codepoint with the same
+ * order X in CHARSET2 for the same language.
+ * As such, it is possible to get missing order. For instance the
+ * ligature of 'o' and 'e' exists in ISO-8859-15 but not in ISO-8859-1
+ * even though they are both used for French. Same for the euro sign.
+ */
+static const unsigned char Windows_1252_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 4X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 6X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  SYM,ILL,SYM, 34,SYM,SYM,SYM,SYM,SYM,SYM, 48,SYM, 49,ILL, 50,ILL, /* 8X */
+  ILL,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, 51,SYM, 52,ILL, 53, 54, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 55,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   56, 44, 57, 58, 17, 19, 38, 40, 32, 28, 45, 59, 60, 61, 47, 62, /* CX */
+   63, 64, 65, 66, 35, 67, 21,SYM, 37, 68, 69, 70, 31, 71, 72, 73, /* DX */
+   74, 44, 75, 76, 17, 19, 38, 40, 32, 28, 45, 77, 78, 79, 47, 80, /* EX */
+   81, 82, 83, 84, 35, 85, 21,SYM, 37, 86, 87, 88, 31, 89, 90, 91, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_9_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 4X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 6X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM, 92,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+   93, 44, 94, 95, 17, 19, 38, 40, 32, 28, 45, 96, 97, 98, 47, 99, /* CX */
+  100,101,102,103, 35,104, 21,SYM, 37,105,106,107, 31,108,109,110, /* DX */
+  111, 44,112,113, 17, 19, 38, 40, 32, 28, 45,114,115,116, 47,117, /* EX */
+  118,119,120,121, 35,122, 21,SYM, 37,123,124,125, 31, 42,126,127, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_1_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 4X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 6X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,SYM,128,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* BX */
+  129, 44,130,131, 17, 19, 38, 40, 32, 28, 45,132,133,134, 47,135, /* CX */
+  136,137,138,139, 35,140, 21,SYM, 37,141,142,143, 31,144,145,146, /* DX */
+  147, 44,148,149, 17, 19, 38, 40, 32, 28, 45,150,151,152, 47,153, /* EX */
+  154,155,156,157, 35,158, 21,SYM, 37,159,160,161, 31,162,163,164, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_4_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 4X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 6X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,165,166,167,SYM,168,169,SYM,SYM,170,171,172,173,SYM,174,SYM, /* AX */
+  SYM,175,SYM,176,SYM,177,178,SYM,SYM,179,180,181,182, 43,183, 43, /* BX */
+   29, 44,184,185, 17, 19, 38,186,187, 28,188,189, 39,190, 47, 41, /* CX */
+  191,192, 33,193, 35,194, 21,SYM, 37, 36,195,196, 31,197, 46,198, /* DX */
+   29, 44,199,200, 17, 19, 38,201,202, 28,203,204, 39,205, 47, 41, /* EX */
+  206,207, 33,208, 35,209, 21,SYM, 37, 36,210,211, 31,212, 46,SYM, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+static const unsigned char Iso_8859_15_CharToOrderMap[] =
+{
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,RET,CTR,CTR,RET,CTR,CTR, /* 0X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 1X */
+  SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* 2X */
+  NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,NUM,SYM,SYM,SYM,SYM,SYM,SYM, /* 3X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 4X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,SYM, /* 5X */
+  SYM,  0, 22, 20,  9,  1, 14, 12, 18,  6, 23, 10,  7, 11,  3,  8, /* 6X */
+   15, 30,  2,  5,  4, 16, 13, 26, 25, 24, 27,SYM,SYM,SYM,SYM,CTR, /* 7X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 8X */
+  CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR,CTR, /* 9X */
+  SYM,SYM,SYM,SYM,SYM,SYM,213,SYM,214,SYM,SYM,SYM,SYM,SYM,SYM,SYM, /* AX */
+  SYM,SYM,SYM,SYM,215,216,SYM,SYM,217,SYM,SYM,SYM,218,219,220,SYM, /* BX */
+  221, 44,222,223, 17, 19, 38, 40, 32, 28, 45,224,225,226, 47,227, /* CX */
+  228,229,230,231, 35,232, 21,SYM, 37,233,234,235, 31,236,237,238, /* DX */
+  239, 44,240,241, 17, 19, 38, 40, 32, 28, 45,242,243,244, 47,245, /* EX */
+  246,247,248,249, 35,249, 21,SYM, 37,249,249,249, 31,249,249,249, /* FX */
+};
+/*X0  X1  X2  X3  X4  X5  X6  X7  X8  X9  XA  XB  XC  XD  XE  XF */
+
+
+/* Model Table:
+ * Total sequences: 748
+ * First 512 sequences: 0.997323508584682
+ * Next 512 sequences (512-1024): 0.0026764914153179875
+ * Rest: 1.7780915628762273e-17
+ * Negative sequences: TODO
+ */
+static const PRUint8 SwedishLangModel[] =
+{
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,0,3,2,3,3,3,3,3,2,0,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,3,2,3,3,3,3,3,3,0,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,2,0,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,0,2,2,2,2,0,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,2,2,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,2,2,3,0,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,0,2,2,2,0,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,2,3,3,2,3,3,2,2,0,2,
+  3,3,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,2,0,0,0,
+  3,3,0,3,3,0,3,2,3,0,2,2,0,0,2,3,2,0,2,0,0,0,2,0,2,2,0,0,0,0,0,
+  3,3,2,2,2,3,3,2,3,2,2,0,0,0,0,0,2,0,2,0,0,0,0,0,2,0,2,2,0,0,0,
+  3,3,0,2,2,0,2,0,3,0,2,0,0,0,0,0,2,0,2,0,0,0,2,0,2,0,0,2,0,0,0,
+  0,3,2,2,0,2,0,2,2,2,0,0,0,2,0,2,0,0,2,0,0,2,2,0,0,0,0,0,0,0,0,
+  0,0,0,2,0,0,2,0,3,0,2,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+};
+
+
+const SequenceModel Windows_1252SwedishModel =
+{
+  Windows_1252_CharToOrderMap,
+  SwedishLangModel,
+  31,
+  (float)0.997323508584682,
+  PR_TRUE,
+  "WINDOWS-1252"
+};
+
+const SequenceModel Iso_8859_9SwedishModel =
+{
+  Iso_8859_9_CharToOrderMap,
+  SwedishLangModel,
+  31,
+  (float)0.997323508584682,
+  PR_TRUE,
+  "ISO-8859-9"
+};
+
+const SequenceModel Iso_8859_1SwedishModel =
+{
+  Iso_8859_1_CharToOrderMap,
+  SwedishLangModel,
+  31,
+  (float)0.997323508584682,
+  PR_TRUE,
+  "ISO-8859-1"
+};
+
+const SequenceModel Iso_8859_4SwedishModel =
+{
+  Iso_8859_4_CharToOrderMap,
+  SwedishLangModel,
+  31,
+  (float)0.997323508584682,
+  PR_TRUE,
+  "ISO-8859-4"
+};
+
+const SequenceModel Iso_8859_15SwedishModel =
+{
+  Iso_8859_15_CharToOrderMap,
+  SwedishLangModel,
+  31,
+  (float)0.997323508584682,
+  PR_TRUE,
+  "ISO-8859-15"
+};

+ 1 - 1
iOSClient/Library/NCUchardet/src/LangModels/LangThaiModel.cpp

@@ -46,7 +46,7 @@ void  nsBig5Prober::Reset(void)
 
 nsProbingState nsBig5Prober::HandleData(const char* aBuf, PRUint32 aLen)
 {
-  nsSMState codingState;
+  PRUint32 codingState;
 
   for (PRUint32 i = 0; i < aLen; i++)
   {

+ 10 - 9
iOSClient/Library/NCUchardet/src/nsBig5Prober.h

@@ -39,11 +39,12 @@
 
 #include "nsPkgInt.h"
 
-typedef enum {
-   eStart = 0,
-   eError = 1,
-   eItsMe = 2 
-} nsSMState;
+/* Apart from these 3 generic states, machine states are specific to
+ * each charset prober.
+ */
+#define eStart 0
+#define eError 1
+#define eItsMe 2
 
 #define GETCLASS(c) GETFROMPCK(((unsigned char)(c)), mModel->classTable)
 
@@ -60,7 +61,7 @@ typedef struct
 class nsCodingStateMachine {
 public:
   nsCodingStateMachine(const SMModel* sm) : mModel(sm) { mCurrentState = eStart; }
-  nsSMState NextState(char c){
+  PRUint32 NextState(char c){
     //for each byte we get its class , if it is first byte, we also get byte length
     PRUint32 byteCls = GETCLASS(c);
     if (mCurrentState == eStart)
@@ -69,8 +70,8 @@ public:
       mCurrentCharLen = mModel->charLenTable[byteCls];
     }
     //from byte's class and stateTable, we get its next state
-    mCurrentState=(nsSMState)GETFROMPCK(mCurrentState*(mModel->classFactor)+byteCls,
-                                       mModel->stateTable);
+    mCurrentState = GETFROMPCK(mCurrentState * mModel->classFactor + byteCls,
+                               mModel->stateTable);
     mCurrentBytePos++;
     return mCurrentState;
   }
@@ -79,7 +80,7 @@ public:
   const char * GetCodingStateMachine() {return mModel->name;}
 
 protected:
-  nsSMState mCurrentState;
+  PRUint32 mCurrentState;
   PRUint32 mCurrentCharLen;
   PRUint32 mCurrentBytePos;
 

+ 1 - 1
iOSClient/Library/NCUchardet/src/nsEUCJPProber.cpp

@@ -52,7 +52,7 @@ void  nsEUCJPProber::Reset(void)
 
 nsProbingState nsEUCJPProber::HandleData(const char* aBuf, PRUint32 aLen)
 {
-  nsSMState codingState;
+  PRUint32 codingState;
 
   for (PRUint32 i = 0; i < aLen; i++)
   {

+ 1 - 1
iOSClient/Library/NCUchardet/src/nsEUCJPProber.h

@@ -47,7 +47,7 @@ void  nsEUCKRProber::Reset(void)
 
 nsProbingState nsEUCKRProber::HandleData(const char* aBuf, PRUint32 aLen)
 {
-  nsSMState codingState;
+  PRUint32 codingState;
 
   for (PRUint32 i = 0; i < aLen; i++)
   {

+ 6 - 1
iOSClient/Library/NCUchardet/src/nsEUCKRProber.h

@@ -51,7 +51,12 @@ public:
   }
   virtual ~nsEUCKRProber(void){delete mCodingSM;}
   nsProbingState HandleData(const char* aBuf, PRUint32 aLen);
-  const char* GetCharSetName() {return "EUC-KR";}
+  /* "Unified Hangul Code", also called "CP949" or "Windows-949" is a
+   * superset of EUC-KR. Though not fully ok to return UHC here (a
+   * separate prober would be better), it is acceptable, since many
+   * Korean documents are actually created with this character set.
+   */
+  const char* GetCharSetName() {return "UHC";}
   nsProbingState GetState(void) {return mState;}
   void      Reset(void);
   float     GetConfidence(void);

+ 1 - 1
iOSClient/Library/NCUchardet/src/nsEUCTWProber.cpp

@@ -47,7 +47,7 @@ void  nsEUCTWProber::Reset(void)
 
 nsProbingState nsEUCTWProber::HandleData(const char* aBuf, PRUint32 aLen)
 {
-  nsSMState codingState;
+  PRUint32 codingState;
 
   for (PRUint32 i = 0; i < aLen; i++)
   {

+ 1 - 1
iOSClient/Library/NCUchardet/src/nsEUCTWProber.h

@@ -75,7 +75,7 @@ void nsEscCharSetProber::Reset(void)
 
 nsProbingState nsEscCharSetProber::HandleData(const char* aBuf, PRUint32 aLen)
 {
-  nsSMState codingState;
+  PRUint32 codingState;
   PRInt32 j;
   PRUint32 i;
 

+ 5 - 1
iOSClient/Library/NCUchardet/src/nsEscCharsetProber.h

@@ -197,7 +197,11 @@ PCK4BITS(eError,eError,eError,eItsMe,eError,eError,eError,eError),//38-3f
 PCK4BITS(eError,eError,eError,eError,eItsMe,eError,eStart,eStart) //40-47 
 };
 
-static const PRUint32 ISO2022JPCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0};
+/* XXX: I needed to complete the 2 last classes for this CharLenTable
+ * but I did it a bit randomly. Cf. bug 101030.
+ * Let's check this piece of code again later when I understand it
+ * better. */
+static const PRUint32 ISO2022JPCharLenTable[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
 const SMModel ISO2022JPSMModel = {
   {eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, ISO2022JP_cls },

+ 1 - 1
iOSClient/Library/NCUchardet/src/nsGB2312Prober.cpp

@@ -52,7 +52,7 @@ void  nsGB18030Prober::Reset(void)
 
 nsProbingState nsGB18030Prober::HandleData(const char* aBuf, PRUint32 aLen)
 {
-  nsSMState codingState;
+  PRUint32 codingState;
 
   for (PRUint32 i = 0; i < aLen; i++)
   {

+ 80 - 0
iOSClient/Library/NCUchardet/src/nsGB2312Prober.h

@@ -111,6 +111,86 @@ nsSBCSGroupProber::nsSBCSGroupProber()
   mProbers[33] = new nsSingleByteCharSetProber(&Iso_8859_1DanishModel);
   mProbers[34] = new nsSingleByteCharSetProber(&Windows_1252DanishModel);
 
+  mProbers[35] = new nsSingleByteCharSetProber(&Iso_8859_13LithuanianModel);
+  mProbers[36] = new nsSingleByteCharSetProber(&Iso_8859_10LithuanianModel);
+  mProbers[37] = new nsSingleByteCharSetProber(&Iso_8859_4LithuanianModel);
+
+  mProbers[38] = new nsSingleByteCharSetProber(&Iso_8859_13LatvianModel);
+  mProbers[39] = new nsSingleByteCharSetProber(&Iso_8859_10LatvianModel);
+  mProbers[40] = new nsSingleByteCharSetProber(&Iso_8859_4LatvianModel);
+
+  mProbers[41] = new nsSingleByteCharSetProber(&Iso_8859_1PortugueseModel);
+  mProbers[42] = new nsSingleByteCharSetProber(&Iso_8859_9PortugueseModel);
+  mProbers[43] = new nsSingleByteCharSetProber(&Iso_8859_15PortugueseModel);
+  mProbers[44] = new nsSingleByteCharSetProber(&Windows_1252PortugueseModel);
+
+  mProbers[45] = new nsSingleByteCharSetProber(&Iso_8859_3MalteseModel);
+
+  mProbers[46] = new nsSingleByteCharSetProber(&Windows_1250CzechModel);
+  mProbers[47] = new nsSingleByteCharSetProber(&Iso_8859_2CzechModel);
+  mProbers[48] = new nsSingleByteCharSetProber(&Mac_CentraleuropeCzechModel);
+  mProbers[49] = new nsSingleByteCharSetProber(&Ibm852CzechModel);
+
+  mProbers[50] = new nsSingleByteCharSetProber(&Windows_1250SlovakModel);
+  mProbers[51] = new nsSingleByteCharSetProber(&Iso_8859_2SlovakModel);
+  mProbers[52] = new nsSingleByteCharSetProber(&Mac_CentraleuropeSlovakModel);
+  mProbers[53] = new nsSingleByteCharSetProber(&Ibm852SlovakModel);
+
+  mProbers[54] = new nsSingleByteCharSetProber(&Windows_1250PolishModel);
+  mProbers[55] = new nsSingleByteCharSetProber(&Iso_8859_2PolishModel);
+  mProbers[56] = new nsSingleByteCharSetProber(&Iso_8859_13PolishModel);
+  mProbers[57] = new nsSingleByteCharSetProber(&Iso_8859_16PolishModel);
+  mProbers[58] = new nsSingleByteCharSetProber(&Mac_CentraleuropePolishModel);
+  mProbers[59] = new nsSingleByteCharSetProber(&Ibm852PolishModel);
+
+  mProbers[60] = new nsSingleByteCharSetProber(&Iso_8859_1FinnishModel);
+  mProbers[61] = new nsSingleByteCharSetProber(&Iso_8859_4FinnishModel);
+  mProbers[62] = new nsSingleByteCharSetProber(&Iso_8859_9FinnishModel);
+  mProbers[63] = new nsSingleByteCharSetProber(&Iso_8859_13FinnishModel);
+  mProbers[64] = new nsSingleByteCharSetProber(&Iso_8859_15FinnishModel);
+  mProbers[65] = new nsSingleByteCharSetProber(&Windows_1252FinnishModel);
+
+  mProbers[66] = new nsSingleByteCharSetProber(&Iso_8859_1ItalianModel);
+  mProbers[67] = new nsSingleByteCharSetProber(&Iso_8859_3ItalianModel);
+  mProbers[68] = new nsSingleByteCharSetProber(&Iso_8859_9ItalianModel);
+  mProbers[69] = new nsSingleByteCharSetProber(&Iso_8859_15ItalianModel);
+  mProbers[70] = new nsSingleByteCharSetProber(&Windows_1252ItalianModel);
+
+  mProbers[71] = new nsSingleByteCharSetProber(&Windows_1250CroatianModel);
+  mProbers[72] = new nsSingleByteCharSetProber(&Iso_8859_2CroatianModel);
+  mProbers[73] = new nsSingleByteCharSetProber(&Iso_8859_13CroatianModel);
+  mProbers[74] = new nsSingleByteCharSetProber(&Iso_8859_16CroatianModel);
+  mProbers[75] = new nsSingleByteCharSetProber(&Mac_CentraleuropeCroatianModel);
+  mProbers[76] = new nsSingleByteCharSetProber(&Ibm852CroatianModel);
+
+  mProbers[77] = new nsSingleByteCharSetProber(&Windows_1252EstonianModel);
+  mProbers[78] = new nsSingleByteCharSetProber(&Windows_1257EstonianModel);
+  mProbers[79] = new nsSingleByteCharSetProber(&Iso_8859_4EstonianModel);
+  mProbers[80] = new nsSingleByteCharSetProber(&Iso_8859_13EstonianModel);
+  mProbers[81] = new nsSingleByteCharSetProber(&Iso_8859_15EstonianModel);
+
+  mProbers[82] = new nsSingleByteCharSetProber(&Iso_8859_1IrishModel);
+  mProbers[83] = new nsSingleByteCharSetProber(&Iso_8859_9IrishModel);
+  mProbers[84] = new nsSingleByteCharSetProber(&Iso_8859_15IrishModel);
+  mProbers[85] = new nsSingleByteCharSetProber(&Windows_1252IrishModel);
+
+  mProbers[86] = new nsSingleByteCharSetProber(&Windows_1250RomanianModel);
+  mProbers[87] = new nsSingleByteCharSetProber(&Iso_8859_2RomanianModel);
+  mProbers[88] = new nsSingleByteCharSetProber(&Iso_8859_16RomanianModel);
+  mProbers[89] = new nsSingleByteCharSetProber(&Ibm852RomanianModel);
+
+  mProbers[90] = new nsSingleByteCharSetProber(&Windows_1250SloveneModel);
+  mProbers[91] = new nsSingleByteCharSetProber(&Iso_8859_2SloveneModel);
+  mProbers[92] = new nsSingleByteCharSetProber(&Iso_8859_16SloveneModel);
+  mProbers[93] = new nsSingleByteCharSetProber(&Mac_CentraleuropeSloveneModel);
+  mProbers[94] = new nsSingleByteCharSetProber(&Ibm852SloveneModel);
+
+  mProbers[95] = new nsSingleByteCharSetProber(&Iso_8859_1SwedishModel);
+  mProbers[96] = new nsSingleByteCharSetProber(&Iso_8859_4SwedishModel);
+  mProbers[97] = new nsSingleByteCharSetProber(&Iso_8859_9SwedishModel);
+  mProbers[98] = new nsSingleByteCharSetProber(&Iso_8859_15SwedishModel);
+  mProbers[99] = new nsSingleByteCharSetProber(&Windows_1252SwedishModel);
+
   Reset();
 }
 

+ 1 - 1
iOSClient/Library/NCUchardet/src/nsSBCSGroupProber.h

@@ -40,7 +40,7 @@
 #define nsSBCSGroupProber_h__
 
 
-#define NUM_OF_SBCS_PROBERS 35
+#define NUM_OF_SBCS_PROBERS 100
 
 class nsCharSetProber;
 class nsSBCSGroupProber: public nsCharSetProber {

+ 1 - 1
iOSClient/Library/NCUchardet/src/nsSBCharSetProber.cpp

@@ -63,7 +63,7 @@ nsProbingState nsSingleByteCharSetProber::HandleData(const char* aBuf, PRUint32
     }
     if (order < mModel->freqCharCount)
     {
-        mFreqChar++;
+      mFreqChar++;
 
       if (mLastOrder < mModel->freqCharCount)
       {

+ 80 - 0
iOSClient/Library/NCUchardet/src/nsSBCharSetProber.h

@@ -172,5 +172,85 @@ extern const SequenceModel Iso_8859_15DanishModel;
 extern const SequenceModel Iso_8859_1DanishModel;
 extern const SequenceModel Windows_1252DanishModel;
 
+extern const SequenceModel Iso_8859_13LithuanianModel;
+extern const SequenceModel Iso_8859_10LithuanianModel;
+extern const SequenceModel Iso_8859_4LithuanianModel;
+
+extern const SequenceModel Iso_8859_13LatvianModel;
+extern const SequenceModel Iso_8859_10LatvianModel;
+extern const SequenceModel Iso_8859_4LatvianModel;
+
+extern const SequenceModel Iso_8859_1PortugueseModel;
+extern const SequenceModel Iso_8859_9PortugueseModel;
+extern const SequenceModel Iso_8859_15PortugueseModel;
+extern const SequenceModel Windows_1252PortugueseModel;
+
+extern const SequenceModel Iso_8859_3MalteseModel;
+
+extern const SequenceModel Windows_1250CzechModel;
+extern const SequenceModel Iso_8859_2CzechModel;
+extern const SequenceModel Ibm852CzechModel;
+extern const SequenceModel Mac_CentraleuropeCzechModel;
+
+extern const SequenceModel Windows_1250SlovakModel;
+extern const SequenceModel Iso_8859_2SlovakModel;
+extern const SequenceModel Ibm852SlovakModel;
+extern const SequenceModel Mac_CentraleuropeSlovakModel;
+
+extern const SequenceModel Windows_1250PolishModel;
+extern const SequenceModel Iso_8859_2PolishModel;
+extern const SequenceModel Iso_8859_13PolishModel;
+extern const SequenceModel Iso_8859_16PolishModel;
+extern const SequenceModel Ibm852PolishModel;
+extern const SequenceModel Mac_CentraleuropePolishModel;
+
+extern const SequenceModel Iso_8859_1FinnishModel;
+extern const SequenceModel Iso_8859_4FinnishModel;
+extern const SequenceModel Iso_8859_9FinnishModel;
+extern const SequenceModel Iso_8859_13FinnishModel;
+extern const SequenceModel Iso_8859_15FinnishModel;
+extern const SequenceModel Windows_1252FinnishModel;
+
+extern const SequenceModel Iso_8859_1ItalianModel;
+extern const SequenceModel Iso_8859_3ItalianModel;
+extern const SequenceModel Iso_8859_9ItalianModel;
+extern const SequenceModel Iso_8859_15ItalianModel;
+extern const SequenceModel Windows_1252ItalianModel;
+
+extern const SequenceModel Windows_1250CroatianModel;
+extern const SequenceModel Iso_8859_2CroatianModel;
+extern const SequenceModel Iso_8859_13CroatianModel;
+extern const SequenceModel Iso_8859_16CroatianModel;
+extern const SequenceModel Ibm852CroatianModel;
+extern const SequenceModel Mac_CentraleuropeCroatianModel;
+
+extern const SequenceModel Windows_1252EstonianModel;
+extern const SequenceModel Windows_1257EstonianModel;
+extern const SequenceModel Iso_8859_4EstonianModel;
+extern const SequenceModel Iso_8859_13EstonianModel;
+extern const SequenceModel Iso_8859_15EstonianModel;
+
+extern const SequenceModel Iso_8859_15IrishModel;
+extern const SequenceModel Iso_8859_9IrishModel;
+extern const SequenceModel Iso_8859_1IrishModel;
+extern const SequenceModel Windows_1252IrishModel;
+
+extern const SequenceModel Windows_1250RomanianModel;
+extern const SequenceModel Iso_8859_2RomanianModel;
+extern const SequenceModel Iso_8859_16RomanianModel;
+extern const SequenceModel Ibm852RomanianModel;
+
+extern const SequenceModel Windows_1250SloveneModel;
+extern const SequenceModel Iso_8859_2SloveneModel;
+extern const SequenceModel Iso_8859_16SloveneModel;
+extern const SequenceModel Ibm852SloveneModel;
+extern const SequenceModel Mac_CentraleuropeSloveneModel;
+
+extern const SequenceModel Iso_8859_1SwedishModel;
+extern const SequenceModel Iso_8859_4SwedishModel;
+extern const SequenceModel Iso_8859_9SwedishModel;
+extern const SequenceModel Iso_8859_15SwedishModel;
+extern const SequenceModel Windows_1252SwedishModel;
+
 #endif /* nsSingleByteCharSetProber_h__ */
 

+ 1 - 1
iOSClient/Library/NCUchardet/src/nsSJISProber.cpp

@@ -52,7 +52,7 @@ void  nsSJISProber::Reset(void)
 
 nsProbingState nsSJISProber::HandleData(const char* aBuf, PRUint32 aLen)
 {
-  nsSMState codingState;
+  PRUint32 codingState;
 
   for (PRUint32 i = 0; i < aLen; i++)
   {

+ 1 - 1
iOSClient/Library/NCUchardet/src/nsSJISProber.h

@@ -46,7 +46,7 @@ void  nsUTF8Prober::Reset(void)
 
 nsProbingState nsUTF8Prober::HandleData(const char* aBuf, PRUint32 aLen)
 {
-  nsSMState codingState;
+  PRUint32 codingState;
 
   for (PRUint32 i = 0; i < aLen; i++)
   {

+ 28 - 24
iOSClient/Library/NCUchardet/src/nsUTF8Prober.h

@@ -113,6 +113,7 @@ nsresult nsUniversalDetector::HandleData(const char* aBuf, PRUint32 aLen)
   {
     mStart = PR_FALSE;
     if (aLen > 2)
+    {
       switch (aBuf[0])
         {
         case '\xEF':
@@ -153,12 +154,13 @@ nsresult nsUniversalDetector::HandleData(const char* aBuf, PRUint32 aLen)
           }
           break;
         }
+    }
 
-      if (mDetectedCharset)
-      {
+    if (mDetectedCharset)
+    {
         mDone = PR_TRUE;
         return NS_OK;
-      }
+    }
   }
 
   PRUint32 i;
@@ -240,16 +242,6 @@ nsresult nsUniversalDetector::HandleData(const char* aBuf, PRUint32 aLen)
       mDone = PR_TRUE;
       mDetectedCharset = mEscCharSetProber->GetCharSetName();
     }
-    else if (mNbspFound)
-    {
-      mDetectedCharset = "ISO-8859-1";
-    }
-    else
-    {
-      /* ASCII with the ESC character (or the sequence "~{") is still
-       * ASCII until proven otherwise. */
-      mDetectedCharset = "ASCII";
-    }
     break;
   case eHighbyte:
     for (i = 0; i < NUM_OF_CHARSET_PROBERS; i++)
@@ -268,17 +260,6 @@ nsresult nsUniversalDetector::HandleData(const char* aBuf, PRUint32 aLen)
     break;
 
   default:
-    if (mNbspFound)
-    {
-      /* ISO-8859-1 is a good result candidate for ASCII + NBSP.
-       * (though it could have been any ISO-8859 encoding). */
-      mDetectedCharset = "ISO-8859-1";
-    }
-    else
-    {
-      /* Pure ASCII */
-      mDetectedCharset = "ASCII";
-    }
     break;
   }
   return NS_OK;
@@ -295,6 +276,29 @@ void nsUniversalDetector::DataEnd()
     return;
   }
 
+  if (! mDetectedCharset)
+  {
+    switch (mInputState)
+    {
+    case eEscAscii:
+    case ePureAscii:
+      if (mNbspFound)
+      {
+          /* ISO-8859-1 is a good result candidate for ASCII + NBSP.
+           * (though it could have been any ISO-8859 encoding). */
+          mDetectedCharset = "ISO-8859-1";
+      }
+      else
+      {
+          /* ASCII with the ESC character (or the sequence "~{") is still
+           * ASCII until proven otherwise. */
+          mDetectedCharset = "ASCII";
+      }
+    default:
+      break;
+    }
+  }
+
   if (mDetectedCharset)
   {
     mDone = PR_TRUE;

+ 11 - 3
iOSClient/Library/NCUchardet/src/nsUniversalDetector.h

@@ -20,6 +20,7 @@
  *
  * Contributor(s):
  *          BYVoid <byvoid.kcp@gmail.com>
+ *          Jehan <jehan at girinstud.io>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -43,22 +44,29 @@ extern "C" {
 
 #include <stddef.h>
 
+/**
+ * A handle for a uchardet encoding detector.
+ */
 typedef struct uchardet * uchardet_t;
 
 /**
  * Create an encoding detector.
- * @return a handle of a instance of uchardet
+ * @return an instance of uchardet_t.
  */
 uchardet_t uchardet_new(void);
 
 /**
  * Delete an encoding detector.
- * @param ud [in] handle of a instance of uchardet
+ * @param ud [in] the uchardet_t handle to delete.
  */
 void uchardet_delete(uchardet_t ud);
 
 /**
  * Feed data to an encoding detector.
+ * The detector is able to shortcut processing when it reaches certainty
+ * for an encoding, so you should not worry about limiting input data.
+ * As far as you should be concerned: the more the better.
+ *
  * @param ud [in] handle of a instance of uchardet
  * @param data [in] data
  * @param len [in] number of byte of data
@@ -67,7 +75,7 @@ void uchardet_delete(uchardet_t ud);
 int uchardet_handle_data(uchardet_t ud, const char * data, size_t len);
 
 /**
- * Notify an end of data to an encoding detctor.
+ * Notify an end of data to an encoding detector.
  * @param ud [in] handle of a instance of uchardet
  */
 void uchardet_data_end(uchardet_t ud);

+ 0 - 1
iOSClient/Main/CCDetail.m

@@ -389,7 +389,6 @@
         [headRequest setHTTPMethod:@"HEAD"];
         
         NSURLSessionDataTask *task = [session dataTaskWithRequest:headRequest completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
-            
             NCUchardet *nsuCharDet = [NCUchardet new];
             NSString *encodingName = [nsuCharDet encodingStringDetectWithData:data];
             [self.webView loadData:[NSData dataWithContentsOfURL: url] MIMEType:response.MIMEType characterEncodingName:encodingName baseURL:url];