Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

927 lines
61 KiB

  1. #include "private.h"
  2. // Table pre-sorted by charset for binary search !!!
  3. const MIMECHARSET MimeCharSet[] =
  4. {
  5. // { Charset, CodePage, InternetEncoding, Flags }
  6. { L"_autodetect", 50932, 50932, MIMECONTF_MIME_LATEST | MIMECONTF_MIME_IE4 },
  7. { L"_autodetect_all", 50001, 50001, MIMECONTF_MIME_LATEST},
  8. { L"_autodetect_kr", 50949, 50949, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  9. { L"_iso-2022-jp$ESC", 932, 50221, MIMECONTF_MIME_IE4 },
  10. { L"_iso-2022-jp$SIO", 932, 50222, MIMECONTF_MIME_IE4 },
  11. { L"437", 1252, 437, MIMECONTF_MIME_LATEST},
  12. { L"ANSI_X3.4-1968", 1252, 20127, MIMECONTF_MIME_LATEST},
  13. { L"ANSI_X3.4-1968", 1252, 1252, MIMECONTF_MIME_IE4},
  14. { L"ANSI_X3.4-1986", 1252, 20127, MIMECONTF_MIME_LATEST},
  15. { L"ANSI_X3.4-1986", 1252, 1252, MIMECONTF_MIME_IE4},
  16. { L"arabic", 1256, 28596, MIMECONTF_MIME_LATEST},
  17. { L"arabic", 1256, 1256, MIMECONTF_MIME_IE4},
  18. { L"ascii", 1252, 20127, MIMECONTF_MIME_LATEST},
  19. { L"ascii", 1252, 1252, MIMECONTF_MIME_IE4},
  20. { L"ASMO-708", 1256, 708, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  21. { L"Big5", 950, 950, MIMECONTF_MIME_LATEST | MIMECONTF_MIME_IE4 },
  22. { L"Big5-HKSCS", 950, 950, MIMECONTF_MIME_LATEST},
  23. { L"CCSID00858", 1252, 858, MIMECONTF_MIME_LATEST },
  24. { L"CCSID00924", 1252, 20924, MIMECONTF_MIME_LATEST },
  25. { L"CCSID01140", 1252, 1140, MIMECONTF_MIME_LATEST },
  26. { L"CCSID01141", 1252, 1141, MIMECONTF_MIME_LATEST },
  27. { L"CCSID01142", 1252, 1142, MIMECONTF_MIME_LATEST },
  28. { L"CCSID01143", 1252, 1143, MIMECONTF_MIME_LATEST },
  29. { L"CCSID01144", 1252, 1144, MIMECONTF_MIME_LATEST },
  30. { L"CCSID01145", 1252, 1145, MIMECONTF_MIME_LATEST },
  31. { L"CCSID01146", 1252, 1146, MIMECONTF_MIME_LATEST },
  32. { L"CCSID01147", 1252, 1147, MIMECONTF_MIME_LATEST },
  33. { L"CCSID01148", 1252, 1148, MIMECONTF_MIME_LATEST },
  34. { L"CCSID01149", 1252, 1149, MIMECONTF_MIME_LATEST },
  35. { L"chinese", 936, 936, MIMECONTF_MIME_LATEST | MIMECONTF_MIME_IE4 },
  36. { L"cn-big5", 950, 950, MIMECONTF_MIME_LATEST},
  37. { L"CN-GB", 936, 936, MIMECONTF_MIME_LATEST },
  38. { L"CP00858", 1252, 858, MIMECONTF_MIME_LATEST },
  39. { L"CP00924", 1252, 20924, MIMECONTF_MIME_LATEST },
  40. { L"CP01140", 1252, 1140, MIMECONTF_MIME_LATEST },
  41. { L"CP01141", 1252, 1141, MIMECONTF_MIME_LATEST },
  42. { L"CP01142", 1252, 1142, MIMECONTF_MIME_LATEST },
  43. { L"CP01143", 1252, 1143, MIMECONTF_MIME_LATEST },
  44. { L"CP01144", 1252, 1144, MIMECONTF_MIME_LATEST },
  45. { L"CP01145", 1252, 1145, MIMECONTF_MIME_LATEST },
  46. { L"CP01146", 1252, 1146, MIMECONTF_MIME_LATEST },
  47. { L"CP01147", 1252, 1147, MIMECONTF_MIME_LATEST },
  48. { L"CP01148", 1252, 1148, MIMECONTF_MIME_LATEST },
  49. { L"CP01149", 1252, 1149, MIMECONTF_MIME_LATEST },
  50. { L"cp037", 1252, 37, MIMECONTF_MIME_LATEST },
  51. { L"cp1025", 1251, 21025, MIMECONTF_MIME_LATEST },
  52. { L"CP1026", 1254, 1026, MIMECONTF_MIME_LATEST },
  53. { L"cp1256", 1256, 1256, MIMECONTF_MIME_LATEST },
  54. { L"CP273", 1252, 20273, MIMECONTF_MIME_LATEST },
  55. { L"CP278", 1252, 20278, MIMECONTF_MIME_LATEST },
  56. { L"CP280", 1252, 20280, MIMECONTF_MIME_LATEST },
  57. { L"CP284", 1252, 20284, MIMECONTF_MIME_LATEST },
  58. { L"CP285", 1252, 20285, MIMECONTF_MIME_LATEST },
  59. { L"cp290", 932, 20290, MIMECONTF_MIME_LATEST },
  60. { L"cp297", 1252, 20297, MIMECONTF_MIME_LATEST },
  61. { L"cp367", 1252, 20127, MIMECONTF_MIME_LATEST},
  62. { L"cp367", 1252, 1252, MIMECONTF_MIME_IE4},
  63. { L"cp420", 1256, 20420, MIMECONTF_MIME_LATEST },
  64. { L"cp423", 1253, 20423, MIMECONTF_MIME_LATEST },
  65. { L"cp424", 1255, 20424, MIMECONTF_MIME_LATEST },
  66. { L"cp437", 1252, 437, MIMECONTF_MIME_LATEST},
  67. { L"CP500", 1252, 500, MIMECONTF_MIME_LATEST },
  68. { L"cp819", 1252, 28591, MIMECONTF_MIME_LATEST},
  69. { L"cp819", 1252, 1252, MIMECONTF_MIME_IE4},
  70. { L"cp850", 1252, 850, MIMECONTF_MIME_LATEST },
  71. { L"cp852", 1250, 852, MIMECONTF_MIME_LATEST},
  72. { L"cp852", 852, 852, MIMECONTF_MIME_IE4 },
  73. { L"cp855", 1250, 855, MIMECONTF_MIME_LATEST },
  74. { L"cp857", 1254, 857, MIMECONTF_MIME_LATEST },
  75. { L"cp858", 1252, 858, MIMECONTF_MIME_LATEST },
  76. { L"cp860", 1252, 860, MIMECONTF_MIME_LATEST },
  77. { L"cp861", 1252, 861, MIMECONTF_MIME_LATEST },
  78. { L"cp862", 1255, 862, MIMECONTF_MIME_LATEST },
  79. { L"cp863", 1252, 863, MIMECONTF_MIME_LATEST },
  80. { L"cp864", 1256, 864, MIMECONTF_MIME_LATEST },
  81. { L"cp865", 1252, 865, MIMECONTF_MIME_LATEST },
  82. { L"cp866", 1251, 866, MIMECONTF_MIME_LATEST },
  83. { L"cp866", 866, 866, MIMECONTF_MIME_IE4 },
  84. { L"cp869", 1253, 869, MIMECONTF_MIME_LATEST },
  85. { L"CP870", 1250, 870, MIMECONTF_MIME_LATEST },
  86. { L"CP871", 1252, 20871, MIMECONTF_MIME_LATEST },
  87. { L"cp875", 1253, 875, MIMECONTF_MIME_LATEST },
  88. { L"cp880", 1251, 20880, MIMECONTF_MIME_LATEST },
  89. { L"CP905", 1254, 20905, MIMECONTF_MIME_LATEST },
  90. { L"cp930", 932, 50930, MIMECONTF_MIME_LATEST },
  91. { L"cp933", 949, 50933, MIMECONTF_MIME_LATEST },
  92. { L"cp935", 936, 50935, MIMECONTF_MIME_LATEST },
  93. { L"cp937", 950, 50937, MIMECONTF_MIME_LATEST },
  94. { L"cp939", 932, 50939, MIMECONTF_MIME_LATEST },
  95. { L"csASCII", 1252, 20127, MIMECONTF_MIME_LATEST},
  96. { L"csASCII", 1252, 1252, MIMECONTF_MIME_IE4},
  97. { L"csbig5", 950, 950, MIMECONTF_MIME_LATEST | MIMECONTF_MIME_IE4 },
  98. { L"csEUCKR", 949, 51949, MIMECONTF_MIME_LATEST },
  99. { L"csEUCPkdFmtJapanese", 932, 51932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  100. { L"csGB2312", 936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  101. { L"csGB231280", 936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  102. { L"csIBM037", 1252, 37, MIMECONTF_MIME_LATEST },
  103. { L"csIBM1026", 1254, 1026, MIMECONTF_MIME_LATEST },
  104. { L"csIBM273", 1252, 20273, MIMECONTF_MIME_LATEST },
  105. { L"csIBM277", 1252, 20277, MIMECONTF_MIME_LATEST },
  106. { L"csIBM278", 1252, 20278, MIMECONTF_MIME_LATEST },
  107. { L"csIBM280", 1252, 20280, MIMECONTF_MIME_LATEST },
  108. { L"csIBM284", 1252, 20284, MIMECONTF_MIME_LATEST },
  109. { L"csIBM285", 1252, 20285, MIMECONTF_MIME_LATEST },
  110. { L"csIBM290", 932, 20290, MIMECONTF_MIME_LATEST },
  111. { L"csIBM297", 1252, 20297, MIMECONTF_MIME_LATEST },
  112. { L"csIBM420", 1256, 20420, MIMECONTF_MIME_LATEST },
  113. { L"csIBM423", 1253, 20423, MIMECONTF_MIME_LATEST },
  114. { L"csIBM424", 1255, 20424, MIMECONTF_MIME_LATEST },
  115. { L"csIBM500", 1252, 500, MIMECONTF_MIME_LATEST },
  116. { L"csIBM870", 1250, 870, MIMECONTF_MIME_LATEST },
  117. { L"csIBM871", 1252, 20871, MIMECONTF_MIME_LATEST },
  118. { L"csIBM880", 1251, 20880, MIMECONTF_MIME_LATEST },
  119. { L"csIBM905", 1254, 20905, MIMECONTF_MIME_LATEST },
  120. { L"csIBMThai", 874, 20838, MIMECONTF_MIME_LATEST },
  121. { L"csISO2022JP", 932, 50221, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  122. { L"csISO2022KR", 949, 50225, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  123. { L"csISO58GB231280", 936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  124. { L"csISOLatin1", 1252, 28591, MIMECONTF_MIME_LATEST},
  125. { L"csISOLatin2", 1250, 28592, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  126. { L"csISOLatin3", 1254, 28593, MIMECONTF_MIME_LATEST},
  127. { L"csISOLatin4", 1257, 28594, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  128. { L"csISOLatin5", 1254, 28599, MIMECONTF_MIME_LATEST },
  129. { L"csISOLatin5", 1251, 28595, MIMECONTF_MIME_IE4},
  130. { L"csISOLatin9", 1252, 28605, MIMECONTF_MIME_LATEST },
  131. { L"csISOLatinArabic", 1256, 28596, MIMECONTF_MIME_LATEST},
  132. { L"csISOLatinArabic", 1256, 1256, MIMECONTF_MIME_IE4},
  133. { L"csISOLatinCyrillic", 1251, 28595, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  134. { L"csISOLatinGreek", 1253, 28597, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  135. { L"csISOLatinHebrew", 1255, 28598, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  136. { L"csKOI8R", 1251, 20866, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  137. { L"csKSC56011987", 949, 949, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  138. { L"csPC8CodePage437", 1252, 437, MIMECONTF_MIME_LATEST},
  139. { L"csShiftJIS", 932, 932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  140. { L"csUnicode11UTF7", 1200, 65000, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  141. { L"csWindows31J", 932, 932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  142. { L"cyrillic", 1251, 28595, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  143. { L"DIN_66003", 1252, 20106, MIMECONTF_MIME_LATEST},
  144. { L"DOS-720", 1256, 720, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  145. { L"DOS-862", 1255, 862, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  146. { L"DOS-874", 874, 874, MIMECONTF_MIME_LATEST},
  147. { L"ebcdic-cp-ar1", 1256, 20420, MIMECONTF_MIME_LATEST },
  148. { L"ebcdic-cp-be", 1252, 500, MIMECONTF_MIME_LATEST },
  149. { L"ebcdic-cp-ca", 1252, 37, MIMECONTF_MIME_LATEST },
  150. { L"ebcdic-cp-ch", 1252, 500, MIMECONTF_MIME_LATEST },
  151. { L"EBCDIC-CP-DK", 1252, 20277, MIMECONTF_MIME_LATEST },
  152. { L"ebcdic-cp-es", 1252, 20284, MIMECONTF_MIME_LATEST },
  153. { L"ebcdic-cp-fi", 1252, 20278, MIMECONTF_MIME_LATEST },
  154. { L"ebcdic-cp-fr", 1252, 20297, MIMECONTF_MIME_LATEST },
  155. { L"ebcdic-cp-gb", 1252, 20285, MIMECONTF_MIME_LATEST },
  156. { L"ebcdic-cp-gr", 1253, 20423, MIMECONTF_MIME_LATEST },
  157. { L"ebcdic-cp-he", 1255, 20424, MIMECONTF_MIME_LATEST },
  158. { L"ebcdic-cp-is", 1252, 20871, MIMECONTF_MIME_LATEST },
  159. { L"ebcdic-cp-it", 1252, 20280, MIMECONTF_MIME_LATEST },
  160. { L"ebcdic-cp-nl", 1252, 37, MIMECONTF_MIME_LATEST },
  161. { L"EBCDIC-CP-NO", 1252, 20277, MIMECONTF_MIME_LATEST },
  162. { L"ebcdic-cp-roece", 1250, 870, MIMECONTF_MIME_LATEST },
  163. { L"ebcdic-cp-se", 1252, 20278, MIMECONTF_MIME_LATEST },
  164. { L"ebcdic-cp-tr", 1254, 20905, MIMECONTF_MIME_LATEST },
  165. { L"ebcdic-cp-us", 1252, 37, MIMECONTF_MIME_LATEST },
  166. { L"ebcdic-cp-wt", 1252, 37, MIMECONTF_MIME_LATEST },
  167. { L"ebcdic-cp-yu", 1250, 870, MIMECONTF_MIME_LATEST },
  168. { L"EBCDIC-Cyrillic", 1251, 20880, MIMECONTF_MIME_LATEST },
  169. { L"ebcdic-de-273+euro", 1252, 1141, MIMECONTF_MIME_LATEST },
  170. { L"ebcdic-dk-277+euro", 1252, 1142, MIMECONTF_MIME_LATEST },
  171. { L"ebcdic-es-284+euro", 1252, 1145, MIMECONTF_MIME_LATEST },
  172. { L"ebcdic-fi-278+euro", 1252, 1143, MIMECONTF_MIME_LATEST },
  173. { L"ebcdic-fr-297+euro", 1252, 1147, MIMECONTF_MIME_LATEST },
  174. { L"ebcdic-gb-285+euro", 1252, 1146, MIMECONTF_MIME_LATEST },
  175. { L"ebcdic-international-500+euro", 1252, 1148, MIMECONTF_MIME_LATEST },
  176. { L"ebcdic-is-871+euro", 1252, 1149, MIMECONTF_MIME_LATEST },
  177. { L"ebcdic-it-280+euro", 1252, 1144, MIMECONTF_MIME_LATEST },
  178. { L"EBCDIC-JP-kana", 932, 20290, MIMECONTF_MIME_LATEST },
  179. { L"ebcdic-Latin9--euro", 1252, 20924, MIMECONTF_MIME_LATEST },
  180. { L"ebcdic-no-277+euro", 1252, 1142, MIMECONTF_MIME_LATEST },
  181. { L"ebcdic-se-278+euro", 1252, 1143, MIMECONTF_MIME_LATEST },
  182. { L"ebcdic-us-37+euro", 1252, 1140, MIMECONTF_MIME_LATEST },
  183. { L"ECMA-114", 1256, 28596, MIMECONTF_MIME_LATEST},
  184. { L"ECMA-114", 1256, 1256, MIMECONTF_MIME_IE4},
  185. { L"ECMA-118", 1253, 28597, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  186. { L"ELOT_928", 1253, 28597, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  187. { L"euc-cn", 936, 51936, MIMECONTF_MIME_LATEST},
  188. { L"euc-jp", 932, 51932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  189. { L"euc-kr", 949, 51949, MIMECONTF_MIME_LATEST },
  190. { L"euc-kr", 949, 949, MIMECONTF_MIME_IE4 },
  191. { L"Extended_UNIX_Code_Packed_Format_for_Japanese", 932, 51932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  192. { L"GB_2312-80", 936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  193. { L"GB18030", 936, 54936, MIMECONTF_MIME_LATEST},
  194. { L"GB2312", 936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  195. { L"GB2312-80", 936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  196. { L"GB231280", 936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  197. { L"GBK", 936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  198. { L"German", 1252, 20106, MIMECONTF_MIME_LATEST},
  199. { L"greek", 1253, 28597, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  200. { L"greek8", 1253, 28597, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  201. { L"hebrew", 1255, 28598, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  202. { L"hz-gb-2312", 936, 52936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  203. { L"IBM00858", 1252, 858, MIMECONTF_MIME_LATEST },
  204. { L"IBM00924", 1252, 20924, MIMECONTF_MIME_LATEST },
  205. { L"IBM01047", 1252, 1047, MIMECONTF_MIME_LATEST },
  206. { L"IBM01140", 1252, 1140, MIMECONTF_MIME_LATEST },
  207. { L"IBM01141", 1252, 1141, MIMECONTF_MIME_LATEST },
  208. { L"IBM01142", 1252, 1142, MIMECONTF_MIME_LATEST },
  209. { L"IBM01143", 1252, 1143, MIMECONTF_MIME_LATEST },
  210. { L"IBM01144", 1252, 1144, MIMECONTF_MIME_LATEST },
  211. { L"IBM01145", 1252, 1145, MIMECONTF_MIME_LATEST },
  212. { L"IBM01146", 1252, 1146, MIMECONTF_MIME_LATEST },
  213. { L"IBM01147", 1252, 1147, MIMECONTF_MIME_LATEST },
  214. { L"IBM01148", 1252, 1148, MIMECONTF_MIME_LATEST },
  215. { L"IBM01149", 1252, 1149, MIMECONTF_MIME_LATEST },
  216. { L"IBM037", 1252, 37, MIMECONTF_MIME_LATEST },
  217. { L"IBM1026", 1254, 1026, MIMECONTF_MIME_LATEST },
  218. { L"IBM273", 1252, 20273, MIMECONTF_MIME_LATEST },
  219. { L"IBM277", 1252, 20277, MIMECONTF_MIME_LATEST },
  220. { L"IBM278", 1252, 20278, MIMECONTF_MIME_LATEST },
  221. { L"IBM280", 1252, 20280, MIMECONTF_MIME_LATEST },
  222. { L"IBM284", 1252, 20284, MIMECONTF_MIME_LATEST },
  223. { L"IBM285", 1252, 20285, MIMECONTF_MIME_LATEST },
  224. { L"IBM290", 932, 20290, MIMECONTF_MIME_LATEST },
  225. { L"IBM297", 1252, 20297, MIMECONTF_MIME_LATEST },
  226. { L"IBM367", 1252, 20127, MIMECONTF_MIME_LATEST},
  227. { L"IBM367", 1252, 1252, MIMECONTF_MIME_IE4},
  228. { L"IBM420", 1256, 20420, MIMECONTF_MIME_LATEST },
  229. { L"IBM423", 1253, 20423, MIMECONTF_MIME_LATEST },
  230. { L"IBM424", 1255, 20424, MIMECONTF_MIME_LATEST },
  231. { L"IBM437", 1252, 437, MIMECONTF_MIME_LATEST},
  232. { L"IBM500", 1252, 500, MIMECONTF_MIME_LATEST },
  233. { L"ibm737", 1252, 737, MIMECONTF_MIME_LATEST},
  234. { L"ibm775", 1257, 775, MIMECONTF_MIME_LATEST},
  235. { L"ibm819", 1252, 28591, MIMECONTF_MIME_LATEST},
  236. { L"ibm819", 1252, 1252, MIMECONTF_MIME_IE4},
  237. { L"IBM850", 1252, 850, MIMECONTF_MIME_LATEST },
  238. { L"IBM852", 1250, 852, MIMECONTF_MIME_LATEST },
  239. { L"IBM852", 852, 852, MIMECONTF_MIME_IE4 },
  240. { L"IBM855", 1250, 855, MIMECONTF_MIME_LATEST },
  241. { L"IBM857", 1254, 857, MIMECONTF_MIME_LATEST },
  242. { L"IBM860", 1252, 860, MIMECONTF_MIME_LATEST },
  243. { L"IBM861", 1252, 861, MIMECONTF_MIME_LATEST },
  244. { L"IBM862", 1255, 862, MIMECONTF_MIME_LATEST },
  245. { L"IBM863", 1252, 863, MIMECONTF_MIME_LATEST },
  246. { L"IBM864", 1256, 864, MIMECONTF_MIME_LATEST },
  247. { L"IBM865", 1252, 865, MIMECONTF_MIME_LATEST },
  248. { L"IBM866", 1251, 866, MIMECONTF_MIME_LATEST },
  249. { L"IBM866", 866, 866, MIMECONTF_MIME_IE4 },
  250. { L"IBM869", 1253, 869, MIMECONTF_MIME_LATEST },
  251. { L"IBM870", 1250, 870, MIMECONTF_MIME_LATEST },
  252. { L"IBM871", 1252, 20871, MIMECONTF_MIME_LATEST },
  253. { L"IBM880", 1251, 20880, MIMECONTF_MIME_LATEST },
  254. { L"IBM905", 1254, 20905, MIMECONTF_MIME_LATEST },
  255. { L"IBM-Thai", 874, 20838, MIMECONTF_MIME_LATEST },
  256. { L"irv", 1252, 20105, MIMECONTF_MIME_LATEST},
  257. { L"ISO_646.irv:1991", 1252, 20127, MIMECONTF_MIME_LATEST},
  258. { L"ISO_646.irv:1991", 1252, 1252, MIMECONTF_MIME_IE4},
  259. { L"iso_8859-1", 1252, 28591, MIMECONTF_MIME_LATEST},
  260. { L"iso_8859-1", 1252, 1252, MIMECONTF_MIME_IE4 },
  261. { L"iso_8859-1:1987", 1252, 28591, MIMECONTF_MIME_LATEST },
  262. { L"iso_8859-1:1987", 1252, 1252, MIMECONTF_MIME_IE4 },
  263. { L"ISO_8859-15", 1252, 28605, MIMECONTF_MIME_LATEST},
  264. { L"iso_8859-2", 1250, 28592, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  265. { L"iso_8859-2:1987", 1250, 28592, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  266. { L"ISO_8859-3", 1254, 28593, MIMECONTF_MIME_LATEST},
  267. { L"ISO_8859-3:1988", 1254, 28593, MIMECONTF_MIME_LATEST},
  268. { L"ISO_8859-4", 1257, 28594, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  269. { L"ISO_8859-4:1988", 1257, 28594, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  270. { L"ISO_8859-5", 1251, 28595, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  271. { L"ISO_8859-5:1988", 1251, 28595, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  272. { L"ISO_8859-6", 1256, 28596, MIMECONTF_MIME_LATEST},
  273. { L"ISO_8859-6", 1256, 1256, MIMECONTF_MIME_IE4},
  274. { L"ISO_8859-6:1987", 1256, 28596, MIMECONTF_MIME_LATEST},
  275. { L"ISO_8859-6:1987", 1256, 1256, MIMECONTF_MIME_IE4},
  276. { L"ISO_8859-7", 1253, 28597, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  277. { L"ISO_8859-7:1987", 1253, 28597, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  278. { L"ISO_8859-8", 1255, 28598, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  279. { L"ISO_8859-8:1988", 1255, 28598, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  280. { L"ISO_8859-8-I", 1255, 1255, MIMECONTF_MIME_IE4 },
  281. { L"ISO_8859-9", 1254, 28599, MIMECONTF_MIME_LATEST},
  282. { L"ISO_8859-9", 1254, 1254, MIMECONTF_MIME_IE4 },
  283. { L"ISO_8859-9:1989", 1254, 28599, MIMECONTF_MIME_LATEST},
  284. { L"ISO_8859-9:1989", 1254, 1254, MIMECONTF_MIME_IE4 },
  285. { L"iso-2022-jp", 932, 50220, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  286. { L"iso-2022-jpeuc", 932, 51932, MIMECONTF_MIME_LATEST},
  287. { L"iso-2022-kr", 949, 50225, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  288. { L"iso-2022-kr-7", 949, 50225, MIMECONTF_MIME_LATEST},
  289. { L"iso-2022-kr-7bit", 949, 50225, MIMECONTF_MIME_LATEST},
  290. { L"iso-2022-kr-8", 949, 51949, MIMECONTF_MIME_LATEST },
  291. { L"iso-2022-kr-8bit", 949, 51949, MIMECONTF_MIME_LATEST },
  292. { L"ISO646-US", 1252, 20127, MIMECONTF_MIME_LATEST },
  293. { L"ISO646-US", 1252, 1252, MIMECONTF_MIME_IE4},
  294. { L"iso8859-1", 1252, 28591, MIMECONTF_MIME_LATEST },
  295. { L"iso8859-1", 1252, 1252, MIMECONTF_MIME_IE4 },
  296. { L"iso-8859-1", 1252, 28591, MIMECONTF_MIME_LATEST},
  297. { L"iso-8859-1", 1252, 1252, MIMECONTF_MIME_IE4},
  298. { L"iso-8859-11", 874, 874, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  299. { L"iso-8859-13", 1257, 28603, MIMECONTF_MIME_LATEST},
  300. { L"iso-8859-15", 1252, 28605, MIMECONTF_MIME_LATEST},
  301. { L"iso8859-2", 1250, 28592, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  302. { L"iso-8859-2", 1250, 28592, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  303. { L"iso-8859-3", 1254, 28593, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  304. { L"iso-8859-4", 1257, 28594, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  305. { L"iso-8859-5", 1251, 28595, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  306. { L"iso-8859-6", 1256, 28596, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  307. { L"iso-8859-7", 1253, 28597, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  308. { L"iso-8859-8", 1255, 28598, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  309. { L"ISO-8859-8 Visual", 1255, 28598, MIMECONTF_MIME_LATEST},
  310. { L"ISO-8859-8 Visual", 1255, 1255, MIMECONTF_MIME_IE4},
  311. { L"iso-8859-8-i", 1255, 38598, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  312. { L"iso-8859-9", 1254, 28599, MIMECONTF_MIME_LATEST},
  313. { L"iso-8859-9", 1254, 1254, MIMECONTF_MIME_IE4 },
  314. { L"iso-ir-100", 1252, 28591, MIMECONTF_MIME_LATEST},
  315. { L"iso-ir-100", 1252, 1252, MIMECONTF_MIME_IE4 },
  316. { L"iso-ir-101", 1250, 28592, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  317. { L"iso-ir-109", 1254, 28593, MIMECONTF_MIME_LATEST},
  318. { L"iso-ir-110", 1257, 28594, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  319. { L"iso-ir-126", 1253, 28597, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  320. { L"iso-ir-127", 1256, 28596, MIMECONTF_MIME_LATEST },
  321. { L"iso-ir-127", 1256, 1256, MIMECONTF_MIME_IE4},
  322. { L"iso-ir-138", 1255, 28598, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  323. { L"iso-ir-144", 1251, 28595, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  324. { L"iso-ir-148", 1254, 28599, MIMECONTF_MIME_LATEST},
  325. { L"iso-ir-148", 1254, 1254, MIMECONTF_MIME_IE4 },
  326. { L"iso-ir-149", 949, 949, MIMECONTF_MIME_LATEST},
  327. { L"iso-ir-58", 936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  328. { L"iso-ir-6", 1252, 20127, MIMECONTF_MIME_LATEST},
  329. { L"iso-ir-6", 1252, 1252, MIMECONTF_MIME_IE4},
  330. { L"Johab", 1361, 1361, MIMECONTF_MIME_LATEST},
  331. { L"koi", 1251, 20866, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  332. { L"koi8", 1251, 20866, MIMECONTF_MIME_LATEST},
  333. { L"koi8r", 1251, 20866, MIMECONTF_MIME_LATEST},
  334. { L"koi8-r", 1251, 20866, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  335. { L"koi8-ru", 1251, 21866, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  336. { L"koi8-u", 1251, 21866, MIMECONTF_MIME_LATEST},
  337. { L"korean", 949, 949, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  338. { L"ks_c_5601", 949, 949, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  339. { L"ks_c_5601_1987", 949, 949, MIMECONTF_MIME_LATEST},
  340. { L"ks_c_5601-1987", 949, 949, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  341. { L"ks_c_5601-1989", 949, 949, MIMECONTF_MIME_LATEST},
  342. { L"KSC_5601", 949, 949, MIMECONTF_MIME_LATEST},
  343. { L"KSC5601", 949, 949, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  344. { L"ks-c5601", 949, 949, MIMECONTF_MIME_LATEST},
  345. { L"ks-c-5601", 949, 949, MIMECONTF_MIME_LATEST},
  346. { L"l1", 1252, 28591, MIMECONTF_MIME_LATEST},
  347. { L"l2", 1250, 28592, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  348. { L"l3", 1254, 28593, MIMECONTF_MIME_LATEST},
  349. { L"l4", 1257, 28594, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  350. { L"l5", 1254, 28599, MIMECONTF_MIME_LATEST },
  351. { L"l5", 1251, 28595, MIMECONTF_MIME_IE4 },
  352. { L"l9", 1252, 28605, MIMECONTF_MIME_LATEST },
  353. { L"latin1", 1252, 28591, MIMECONTF_MIME_LATEST },
  354. { L"latin1", 1252, 1252, MIMECONTF_MIME_IE4 },
  355. { L"latin2", 1250, 28592, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  356. { L"latin3", 1254, 28593, MIMECONTF_MIME_LATEST},
  357. { L"latin4", 1257, 28594, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  358. { L"latin5", 1254, 28599, MIMECONTF_MIME_LATEST},
  359. { L"latin5", 1254, 1254, MIMECONTF_MIME_IE4},
  360. { L"latin9", 1252, 28605, MIMECONTF_MIME_LATEST},
  361. { L"logical", 1255, 28598, MIMECONTF_MIME_LATEST},
  362. { L"logical", 1255, 1255, MIMECONTF_MIME_IE4},
  363. { L"macintosh", 1252, 10000, MIMECONTF_MIME_LATEST},
  364. { L"ms_Kanji", 932, 932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  365. { L"Norwegian", 1252, 20108, MIMECONTF_MIME_LATEST},
  366. { L"NS_4551-1", 1252, 20108, MIMECONTF_MIME_LATEST},
  367. { L"PC-Multilingual-850+euro", 1252, 858, MIMECONTF_MIME_LATEST },
  368. { L"SEN_850200_B", 1252, 20107, MIMECONTF_MIME_LATEST},
  369. { L"shift_jis", 932, 932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  370. { L"shift-jis", 932, 932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  371. { L"sjis", 932, 932, MIMECONTF_MIME_LATEST},
  372. { L"Swedish", 1252, 20107, MIMECONTF_MIME_LATEST},
  373. { L"TIS-620", 874, 874, MIMECONTF_MIME_LATEST},
  374. { L"unicode", 1200, 1200, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  375. { L"unicode-1-1-utf-7", 1200, 65000, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  376. { L"unicode-1-1-utf-8", 1200, 65001, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  377. { L"unicode-2-0-utf-7", 1200, 65000, MIMECONTF_MIME_LATEST},
  378. { L"unicode-2-0-utf-8",1200, 65001, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  379. { L"unicodeFFFE", 1200, 1201, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  380. { L"us", 1252, 20127, MIMECONTF_MIME_LATEST},
  381. { L"us", 1252, 1252, MIMECONTF_MIME_IE4},
  382. { L"us-ascii", 1252, 20127, MIMECONTF_MIME_LATEST},
  383. { L"us-ascii", 1252, 1252, MIMECONTF_MIME_IE4},
  384. { L"utf-16", 1200, 1200, MIMECONTF_MIME_LATEST },
  385. { L"UTF-16BE", 1200, 1201, MIMECONTF_MIME_LATEST },
  386. { L"UTF-16LE", 1200, 1200, MIMECONTF_MIME_LATEST },
  387. { L"utf-7", 1200, 65000, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  388. { L"utf-8", 1200, 65001, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  389. { L"visual", 1255, 28598, MIMECONTF_MIME_LATEST},
  390. { L"visual", 1255, 1255, MIMECONTF_MIME_IE4 },
  391. { L"windows-1250", 1250, 1250, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  392. { L"windows-1251", 1251, 1251, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  393. { L"windows-1252", 1252, 1252, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  394. { L"windows-1253", 1253, 1253, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  395. { L"Windows-1254", 1254, 1254, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  396. { L"windows-1255", 1255, 1255, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  397. { L"windows-1256", 1256, 1256, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  398. { L"windows-1257", 1257, 1257, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  399. { L"windows-1258", 1258, 1258, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  400. { L"windows-874", 874, 874, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  401. { L"x-ansi", 1252, 1252, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  402. { L"x-Chinese-CNS", 950, 20000, MIMECONTF_MIME_LATEST},
  403. { L"x-Chinese-Eten", 950, 20002, MIMECONTF_MIME_LATEST},
  404. { L"x-cp1250", 1250, 1250, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  405. { L"x-cp1251", 1251, 1251, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  406. { L"x-cp20001", 1252, 20001, MIMECONTF_MIME_LATEST },
  407. { L"x-cp20003", 1252, 20003, MIMECONTF_MIME_LATEST },
  408. { L"x-cp20004", 1252, 20004, MIMECONTF_MIME_LATEST },
  409. { L"x-cp20005", 1252, 20005, MIMECONTF_MIME_LATEST },
  410. { L"x-cp20261", 1252, 20261, MIMECONTF_MIME_LATEST },
  411. { L"x-cp20269", 1252, 20269, MIMECONTF_MIME_LATEST },
  412. { L"x-cp20936", 1252, 20936, MIMECONTF_MIME_LATEST },
  413. { L"x-cp20949", 1252, 20949, MIMECONTF_MIME_LATEST },
  414. { L"x-cp21027", 1252, 21027, MIMECONTF_MIME_LATEST },
  415. { L"x-cp50227", 1252, 50227, MIMECONTF_MIME_LATEST },
  416. { L"x-cp50229", 1252, 50229, MIMECONTF_MIME_LATEST },
  417. { L"X-EBCDIC-JapaneseAndUSCanada", 932, 50931, MIMECONTF_MIME_LATEST },
  418. { L"X-EBCDIC-KoreanExtended", 949, 20833, MIMECONTF_MIME_LATEST },
  419. { L"x-euc", 932, 51932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  420. { L"x-euc-cn", 936, 51936, MIMECONTF_MIME_LATEST},
  421. { L"x-euc-jp", 932, 51932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  422. { L"x-Europa", 1252, 29001, MIMECONTF_MIME_LATEST},
  423. { L"x-IA5", 1252, 20105, MIMECONTF_MIME_LATEST},
  424. { L"x-IA5-German", 1252, 20106, MIMECONTF_MIME_LATEST},
  425. { L"x-IA5-Norwegian", 1252, 20108, MIMECONTF_MIME_LATEST},
  426. { L"x-IA5-Swedish", 1252, 20107, MIMECONTF_MIME_LATEST},
  427. { L"x-iscii-as", 57006, 57006, MIMECONTF_MIME_LATEST},
  428. { L"x-iscii-be", 57003, 57003, MIMECONTF_MIME_LATEST},
  429. { L"x-iscii-de", 57002, 57002, MIMECONTF_MIME_LATEST},
  430. { L"x-iscii-gu", 57010, 57010, MIMECONTF_MIME_LATEST},
  431. { L"x-iscii-ka", 57008, 57008, MIMECONTF_MIME_LATEST},
  432. { L"x-iscii-ma", 57009, 57009, MIMECONTF_MIME_LATEST},
  433. { L"x-iscii-or", 57007, 57007, MIMECONTF_MIME_LATEST},
  434. { L"x-iscii-pa", 57011, 57011, MIMECONTF_MIME_LATEST},
  435. { L"x-iscii-ta", 57004, 57004, MIMECONTF_MIME_LATEST},
  436. { L"x-iscii-te", 57005, 57005, MIMECONTF_MIME_LATEST},
  437. { L"x-mac-arabic", 1256, 10004, MIMECONTF_MIME_LATEST},
  438. { L"x-mac-ce", 1250, 10029, MIMECONTF_MIME_LATEST},
  439. { L"x-mac-chinesesimp", 936, 10008, MIMECONTF_MIME_LATEST},
  440. { L"x-mac-chinesetrad", 950, 10002, MIMECONTF_MIME_LATEST},
  441. { L"x-mac-croatian", 1250, 10082, MIMECONTF_MIME_LATEST},
  442. { L"x-mac-cyrillic", 1251, 10007, MIMECONTF_MIME_LATEST},
  443. { L"x-mac-greek", 1253, 10006, MIMECONTF_MIME_LATEST},
  444. { L"x-mac-hebrew", 1255, 10005, MIMECONTF_MIME_LATEST},
  445. { L"x-mac-icelandic", 1252, 10079, MIMECONTF_MIME_LATEST},
  446. { L"x-mac-japanese", 932, 10001, MIMECONTF_MIME_LATEST},
  447. { L"x-mac-korean", 949, 10003, MIMECONTF_MIME_LATEST},
  448. { L"x-mac-romanian", 1250, 10010, MIMECONTF_MIME_LATEST},
  449. { L"x-mac-thai", 874, 10021, MIMECONTF_MIME_LATEST},
  450. { L"x-mac-turkish", 1254, 10081, MIMECONTF_MIME_LATEST},
  451. { L"x-mac-ukrainian", 1251, 10017, MIMECONTF_MIME_LATEST},
  452. { L"x-ms-cp932", 932, 932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  453. { L"x-sjis", 932, 932, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4 },
  454. { L"x-unicode-1-1-utf-7", 1200, 65000, MIMECONTF_MIME_LATEST},
  455. { L"x-unicode-1-1-utf-8", 1200, 65001, MIMECONTF_MIME_LATEST},
  456. { L"x-unicode-2-0-utf-7", 1200, 65000, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  457. { L"x-unicode-2-0-utf-8", 1200, 65001, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  458. { L"x-user-defined", 50000, 50000, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  459. { L"x-x-big5", 950, 950, MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4},
  460. // { Charset, CodePage, InternetEncoding, Flags }
  461. };
  462. // Hard code sorted table by code page description and family code page.
  463. MIMECODEPAGE MimeCodePage[] =
  464. {
  465. // { CodePage, HeaderCharset, BodyCharset, WebCharset, FixedWidthFont, ProportionalFont, Description, FamilyCodePage, Flags }
  466. { 864, NULL, L"IBM864", NULL, 0, 0, IDS_DESC_864, 1256, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  467. { 708, NULL, L"ASMO-708", NULL, 0, 0, IDS_DESC_708, 1256, 0x00000606|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  468. { 708, NULL, L"ASMO-708", NULL, 0, 0, IDS_DESC_708, 1256, 0x00000707|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  469. { 51256, NULL, L"_autodetect_arabic", L"windows-1256", 0, 0, IDS_DESC_51256, 1256, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT },
  470. { 720, NULL, L"DOS-720", NULL, 0, 0, IDS_DESC_720, 1256, 0x00000606|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  471. { 720, NULL, L"DOS-720", NULL, 0, 0, IDS_DESC_720, 1256, 0x00000707|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  472. { 28596, NULL, L"iso-8859-6", NULL, 0, 0, IDS_DESC_28596, 1256, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  473. { 10004, NULL, L"x-mac-arabic", NULL, 0, 0, IDS_DESC_10004, 1256, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  474. { 1256, NULL, L"windows-1256", NULL, IDS_FONT_ARABIC_FIXED, IDS_FONT_ARABIC_PROP, IDS_DESC_1256, 0, 0x00000303|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  475. { 1256, NULL, L"windows-1256", L"windows-1256", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1256, 0, 0x00000707| MIMECONTF_MIME_IE4},
  476. { 50001, NULL, L"_autodetect_all", NULL, 0, 0, IDS_DESC_50001, 0, 0x00000007|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT},
  477. { 775, NULL, L"ibm775", NULL, 0, 0, IDS_DESC_775, 1257, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  478. { 28594, NULL, L"iso-8859-4", NULL, 0, 0, IDS_DESC_28594, 1257, 0x00000303|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  479. { 28594, NULL, L"iso-8859-4", NULL, 0, 0, IDS_DESC_28594, 1257, 0x00000301|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  480. { 1257, L"windows-1257", L"windows-1257", L"windows-1257", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1257, 0, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  481. { 1257, NULL, L"iso-8859-4", L"windows-1257", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1257, 0, 0x00000707|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  482. { 852, NULL, L"ibm852", NULL, 0, 0, IDS_DESC_852, 1250, 0x00000202|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  483. { 28592, NULL, L"iso-8859-2", NULL, 0, 0, IDS_DESC_28592, 1250, 0x00000707|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  484. { 10029, NULL, L"x-mac-ce", NULL, 0, 0, IDS_DESC_10029, 1250, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  485. { 1250, L"windows-1250", L"iso-8859-2", L"windows-1250", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1250, 0, 0x00000303|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  486. { 1250, NULL, L"iso-8859-2", L"windows-1250", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1250, 0, 0x00000303|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  487. { 50936, NULL, L"_autodetect_chs", NULL, 0, 0, IDS_DESC_50936, 936, MIMECONTF_MIME_LATEST| MIMECONTF_IMPORT },
  488. { 51936, NULL, L"EUC-CN", NULL, 0, 0, IDS_DESC_51936, 936, 0x00000000|MIMECONTF_MIME_LATEST|MIMECONTF_EXPORT|MIMECONTF_IMPORT},
  489. { 54936, NULL, L"GB18030", NULL, IDS_FONT_CHINESE_FIXED, IDS_FONT_CHINESE_PROP, IDS_DESC_54936, 936, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  490. { 936, NULL, L"gb2312", NULL, IDS_FONT_CHINESE_FIXED, IDS_FONT_CHINESE_PROP, IDS_DESC_936, 0, 0x00000707|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  491. { 20936, NULL, L"x-cp20936", NULL, 0, 0, IDS_DESC_20936, 936, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  492. { 52936, NULL, L"hz-gb-2312", NULL, 0, 0, IDS_DESC_52936, 936, 0x00000303|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  493. { 50227, NULL, L"x-cp50227", NULL, 0, 0, IDS_DESC_50227, 936, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  494. { 10008, NULL, L"x-mac-chinesesimp", NULL, 0, 0, IDS_DESC_10008, 936, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  495. { 50950, NULL, L"_autodetect_cht", NULL, 0, 0, IDS_DESC_50950, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT},
  496. { 950, NULL, L"big5", NULL, IDS_FONT_TAIWAN_FIXED, IDS_FONT_TAIWAN_PROP, IDS_DESC_950, 0, 0x00000707|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  497. { 20000, NULL, L"x-Chinese-CNS", NULL, 0, 0, IDS_DESC_20000, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  498. { 20002, NULL, L"x-Chinese-Eten", NULL, 0, 0, IDS_DESC_20002, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  499. { 50229, NULL, L"x-cp50229", NULL, 0, 0, IDS_DESC_50229, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  500. { 10002, NULL, L"x-mac-chinesetrad", NULL, 0, 0, IDS_DESC_10002, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  501. { 10082, NULL, L"x-mac-croatian", NULL, 0, 0, IDS_DESC_10082, 1250, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  502. { 51251, NULL, L"_auto_detect_cyrillic", L"windows-1251", 0, 0, IDS_DESC_51251, 1251, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT},
  503. { 866, NULL, L"cp866", NULL, 0, 0, IDS_DESC_866, 1251, 0x00000202|MIMECONTF_MIME_LATEST|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  504. { 28595, NULL, L"iso-8859-5", NULL, 0, 0, IDS_DESC_28595, 1251, 0x00000707|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  505. { 20866, NULL, L"koi8-r", NULL, 0, 0, IDS_DESC_20866, 1251, 0x00000707|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  506. { 21866, NULL, L"koi8-u", NULL, 0, 0, IDS_DESC_21866, 1251, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  507. { 21866, NULL, L"koi8-ru", NULL, 0, 0, IDS_DESC_21866, 1251, 0x00000707|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  508. { 10007, NULL, L"x-mac-cyrillic", NULL, 0, 0, IDS_DESC_10007, 1251, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  509. { 1251, L"windows-1251", L"koi8-r", L"windows-1251", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1251, 0, 0x00000303|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  510. { 1251, NULL, L"koi8-r", L"windows-1251", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1251, 0, 0x00000303|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  511. { 28603, NULL, L"iso-8859-13", NULL, 0, 0, IDS_DESC_28603, 1257, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  512. { 29001, NULL, L"x-Europa", NULL, 0, 0, IDS_DESC_29001, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  513. { 21027, NULL, L"x-cp21027", NULL, 0, 0, IDS_DESC_21027, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  514. { 863, NULL, L"IBM863", NULL, 0, 0, IDS_DESC_863, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  515. { 20106, NULL, L"x-IA5-German", NULL, 0, 0, IDS_DESC_20106, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  516. { 51253, NULL, L"_auto_detect_greek", L"windows-1253", 0, 0, IDS_DESC_51253, 1253, MIMECONTF_MIME_LATEST| MIMECONTF_IMPORT},
  517. { 737, NULL, L"ibm737", NULL, 0, 0, IDS_DESC_737, 1253, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  518. { 28597, NULL, L"iso-8859-7", NULL, 0, 0, IDS_DESC_28597, 1253, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  519. { 10006, NULL, L"x-mac-greek", NULL, 0, 0, IDS_DESC_10006, 1253, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  520. { 1253, L"windows-1253", L"iso-8859-7", L"windows-1253", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1253, 0, 0x00000303|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  521. { 1253, NULL, L"iso-8859-7", L"windows-1253", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1253, 0, 0x00000303|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  522. { 869, NULL, L"ibm869", NULL, 0, 0, IDS_DESC_869, 1253, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  523. { 862, NULL, L"DOS-862", NULL, 0, 0, IDS_DESC_862, 1255, 0x00000606|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  524. { 862, NULL, L"DOS-862", NULL, 0, 0, IDS_DESC_862, 1255, 0x00000707|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  525. { 38598, NULL, L"iso-8859-8-i", NULL, 0, 0, IDS_DESC_38598, 1255, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  526. { 28598, NULL, L"iso-8859-8", NULL, 0, 0, IDS_DESC_28598, 1255, 0x00000606|MIMECONTF_MIME_LATEST|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  527. { 10005, NULL, L"x-mac-hebrew", NULL, 0, 0, IDS_DESC_10005, 1255, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  528. { 1255, NULL, L"windows-1255", NULL, IDS_FONT_HEBREW_FIXED, IDS_FONT_HEBREW_PROP, IDS_DESC_1255, 0, 0x00000303|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  529. { 1255, NULL, L"iso-8859-8", L"windows-1255", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1255, 0, 0x00000707|MIMECONTF_MIME_IE4},
  530. { 20003, NULL, L"x-cp20003", NULL, 0, 0, IDS_DESC_20003, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  531. { 20420, NULL, L"IBM420", NULL, 0, 0, IDS_DESC_20420, 1256, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  532. { 20880, NULL, L"IBM880", NULL, 0, 0, IDS_DESC_20880, 1251, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  533. { 21025, NULL, L"cp1025", NULL, 0, 0, IDS_DESC_21025, 1251, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  534. { 20277, NULL, L"IBM277", NULL, 0, 0, IDS_DESC_20277, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  535. { 1142, NULL, L"IBM01142", NULL, 0, 0, IDS_DESC_1142, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  536. { 20278, NULL, L"IBM278", NULL, 0, 0, IDS_DESC_20278, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  537. { 1143, NULL, L"IBM01143", NULL, 0, 0, IDS_DESC_1143, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  538. { 20297, NULL, L"IBM297", NULL, 0, 0, IDS_DESC_20297, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  539. { 1147, NULL, L"IBM01147", NULL, 0, 0, IDS_DESC_1147, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  540. { 20273, NULL, L"IBM273", NULL, 0, 0, IDS_DESC_20273, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  541. { 1141, NULL, L"IBM01141", NULL, 0, 0, IDS_DESC_1141, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  542. { 20423, NULL, L"IBM423", NULL, 0, 0, IDS_DESC_20423, 1253, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  543. { 875, NULL, L"cp875", NULL, 0, 0, IDS_DESC_875, 1253, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  544. { 20424, NULL, L"IBM424", NULL, 0, 0, IDS_DESC_20424, 1255, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  545. { 20871, NULL, L"IBM871", NULL, 0, 0, IDS_DESC_20871, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  546. { 1149, NULL, L"IBM01149", NULL, 0, 0, IDS_DESC_1149, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  547. { 500, NULL, L"IBM500", NULL, 0, 0, IDS_DESC_500, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  548. { 1148, NULL, L"IBM01148", NULL, 0, 0, IDS_DESC_1148, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  549. { 20280, NULL, L"IBM280", NULL, 0, 0, IDS_DESC_20280, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  550. { 1144, NULL, L"IBM01144", NULL, 0, 0, IDS_DESC_1144, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  551. { 50930, NULL, L"cp930", NULL, 0, 0, IDS_DESC_50930, 932, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  552. { 50939, NULL, L"cp939", NULL, 0, 0, IDS_DESC_50939, 932, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  553. { 50931, NULL, L"x-EBCDIC-JapaneseAndUSCanada", NULL, 0, 0, IDS_DESC_50931, 932, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  554. { 20290, NULL, L"IBM290", NULL, 0, 0, IDS_DESC_20290, 932, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  555. { 50933, NULL, L"cp933", NULL, 0, 0, IDS_DESC_50933, 949, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  556. { 20833, NULL, L"x-EBCDIC-KoreanExtended", NULL, 0, 0, IDS_DESC_20833, 949, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  557. { 870, NULL, L"IBM870", NULL, 0, 0, IDS_DESC_870, 1250, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  558. { 50935, NULL, L"cp935", NULL, 0, 0, IDS_DESC_50935, 936, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  559. { 20284, NULL, L"IBM284", NULL, 0, 0, IDS_DESC_20284, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  560. { 1145, NULL, L"IBM01145", NULL, 0, 0, IDS_DESC_1145, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  561. { 20838, NULL, L"IBM-Thai", NULL, 0, 0, IDS_DESC_20838, 874, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  562. { 50937, NULL, L"cp937", NULL, 0, 0, IDS_DESC_50937, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  563. { 20905, NULL, L"IBM905", NULL, 0, 0, IDS_DESC_20905, 1254, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  564. { 1026, NULL, L"IBM1026", NULL, 0, 0, IDS_DESC_1026, 1254, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  565. { 20285, NULL, L"IBM285", NULL, 0, 0, IDS_DESC_20285, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  566. { 1146, NULL, L"IBM01146", NULL, 0, 0, IDS_DESC_1146, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  567. { 37, NULL, L"IBM037", NULL, 0, 0, IDS_DESC_37, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  568. { 1140, NULL, L"IBM01140", NULL, 0, 0, IDS_DESC_1140, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  569. { 1047, NULL, L"IBM01047", NULL, 0, 0, IDS_DESC_1047, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  570. { 20924, NULL, L"IBM00924", NULL, 0, 0, IDS_DESC_20924, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  571. { 861, NULL, L"ibm861", NULL, 0, 0, IDS_DESC_861, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  572. { 10079, NULL, L"x-mac-icelandic", NULL, 0, 0, IDS_DESC_10079, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  573. { 57006, NULL, L"x-iscii-as", NULL, 0, 0, IDS_DESC_57006, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  574. { 57003, NULL, L"x-iscii-be", NULL, 0, 0, IDS_DESC_57003, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  575. { 57002, NULL, L"x-iscii-de", NULL, IDS_FONT_DEVANAGARI_FIXED, IDS_FONT_DEVANAGARI_PROP, IDS_DESC_57002, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  576. { 57010, NULL, L"x-iscii-gu", NULL, 0, 0, IDS_DESC_57010, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  577. { 57008, NULL, L"x-iscii-ka", NULL, 0, 0, IDS_DESC_57008, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  578. { 57009, NULL, L"x-iscii-ma", NULL, 0, 0, IDS_DESC_57009, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  579. { 57007, NULL, L"x-iscii-or", NULL, 0, 0, IDS_DESC_57007, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  580. { 57011, NULL, L"x-iscii-pa", NULL, 0, 0, IDS_DESC_57011, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  581. { 57004, NULL, L"x-iscii-ta", NULL, IDS_FONT_TAMIL_FIXED, IDS_FONT_TAMIL_PROP, IDS_DESC_57004, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  582. { 57005, NULL, L"x-iscii-te", NULL, 0, 0, IDS_DESC_57005, 0, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  583. { 20269, NULL, L"x-cp20269", NULL, 0, 0, IDS_DESC_20269, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  584. { 50932, NULL, L"_autodetect", NULL, 0, 0, IDS_DESC_50932, 932, 0x00000007|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT},
  585. { 51932, NULL, L"euc-jp", NULL, 0, 0, IDS_DESC_51932, 932, 0x00000707|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  586. { 50220, NULL, L"iso-2022-jp", NULL, 0, 0, IDS_DESC_50220, 932, 0x00000101|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  587. { 20932, NULL, L"EUC-JP", NULL, 0, 0, IDS_DESC_20932, 932, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  588. { 50221, NULL, L"iso-2022-jp", L"csISO2022JP", 0, 0, IDS_DESC_50221, 932, 0x00000301|MIMECONTF_MIME_LATEST|MIMECONTF_EXPORT},
  589. { 50221, NULL, L"_iso-2022-jp$ESC", L"csISO2022JP", 0, 0, IDS_DESC_50221, 932, 0x00000301|MIMECONTF_MIME_IE4|MIMECONTF_EXPORT},
  590. { 50222, NULL, L"iso-2022-jp", NULL, 0, 0, IDS_DESC_50222, 932, MIMECONTF_MIME_LATEST|MIMECONTF_EXPORT},
  591. { 50222, NULL, L"_iso-2022-jp$SIO", L"iso-2022-jp", 0, 0, IDS_DESC_50222, 932, MIMECONTF_MIME_IE4|MIMECONTF_EXPORT},
  592. { 10001, NULL, L"x-mac-japanese", NULL, 0, 0, IDS_DESC_10001, 932, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  593. { 932, NULL, L"iso-2022-jp", L"shift_jis", IDS_FONT_JAPANESE_FIXED, IDS_FONT_JAPANESE_PROP, IDS_DESC_932, 0, 0x00000707|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  594. { 949, NULL, L"ks_c_5601-1987", NULL, IDS_FONT_KOREAN_FIXED, IDS_FONT_KOREAN_PROP, IDS_DESC_949, 0, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  595. { 949, L"euc-kr", L"euc-kr", L"ks_c_5601-1987", IDS_FONT_KOREAN_FIXED4, IDS_FONT_KOREAN_PROP4, IDS_DESC_949, 0, 0x00000707| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  596. { 50949, NULL, L"_autodetect_kr", NULL, 0, 0, IDS_DESC_50949, 949, 0x00000001|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT},
  597. { 51949, NULL, L"euc-kr", NULL, 0, 0, IDS_DESC_51949, 949, 0x00000000|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT|MIMECONTF_MAILNEWS|MIMECONTF_SAVABLE_MAILNEWS},
  598. { 51949, NULL, L"euc-kr", NULL, 0, 0, IDS_DESC_51949, 949, 0x00000000| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  599. { 50225, L"euc-kr", L"iso-2022-kr", L"iso-2022-kr", 0, 0, IDS_DESC_50225, 949, 0x00000001|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  600. { 50225, NULL, L"iso-2022-kr", L"iso-2022-kr", 0, 0, IDS_DESC_50225, 949, 0x00000101| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  601. { 1361, NULL, L"Johab", NULL,IDS_FONT_KOREAN_FIXED, IDS_FONT_KOREAN_PROP, IDS_DESC_1361, 949, 0x00000000|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  602. { 10003, NULL, L"x-mac-korean", NULL, 0, 0, IDS_DESC_10003, 949, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  603. { 20949, NULL, L"x-cp20949", NULL, 0, 0, IDS_DESC_20949, 949, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  604. { 28593, NULL, L"iso-8859-3", NULL, 0, 0, IDS_DESC_28593, 1254, 0x00000501|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  605. { 28605, NULL, L"iso-8859-15", NULL, 0, 0, IDS_DESC_28605, 1252, 0x00000701|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  606. { 865, NULL, L"IBM865", NULL, 0, 0, IDS_DESC_865, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  607. { 20108, NULL, L"x-IA5-Norwegian", NULL, 0, 0, IDS_DESC_20108, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  608. { 855, NULL, L"IBM855", NULL, 0, 0, IDS_DESC_855, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  609. { 437, NULL, L"IBM437", NULL, 0, 0, IDS_DESC_437, 1252, 0x00000000|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  610. { 858, NULL, L"IBM00858", NULL, 0, 0, IDS_DESC_858, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  611. { 860, NULL, L"IBM860", NULL, 0, 0, IDS_DESC_860, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  612. { 10010, NULL, L"x-mac-romanian", NULL, 0, 0, IDS_DESC_10010, 1250, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  613. { 20107, NULL, L"x-IA5-Swedish", NULL, 0, 0, IDS_DESC_20107, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  614. { 20261, NULL, L"x-cp20261", NULL, 0, 0, IDS_DESC_20261, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  615. { 20001, NULL, L"x-cp20001", NULL, 0, 0, IDS_DESC_20001, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  616. { 20004, NULL, L"x-cp20004", NULL, 0, 0, IDS_DESC_20004, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  617. { 10021, NULL, L"x-mac-thai", NULL, IDS_FONT_THAI_FIXED, IDS_FONT_THAI_PROP, IDS_DESC_10021, 874, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  618. { 874, NULL, L"windows-874", NULL, IDS_FONT_THAI_FIXED, IDS_FONT_THAI_PROP, IDS_DESC_874, 0, 0x00000707|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  619. { 874, NULL, L"windows-874", NULL, IDS_FONT_THAI_FIXED2, IDS_FONT_THAI_PROP2, IDS_DESC_874, 0, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  620. { 857, NULL, L"ibm857", NULL, 0, 0, IDS_DESC_857, 1254, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  621. { 28599, NULL, L"iso-8859-9", NULL, 0, 0, IDS_DESC_28599, 1254, 0x00000707|MIMECONTF_MIME_LATEST| MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  622. { 10081, NULL, L"x-mac-turkish", NULL, 0, 0, IDS_DESC_10081, 1254, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  623. { 1254, L"windows-1254", L"iso-8859-9", L"windows-1254", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1254, 0, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  624. { 10017, NULL, L"x-mac-ukrainian", NULL, 0, 0, IDS_DESC_10017, 1251, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  625. { 1254, NULL, L"iso-8859-9", L"iso-8859-9", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1254, 0, 0x00000707|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  626. { 1200, NULL, L"unicode", NULL, IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1200, 0, 0x00000204|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  627. { 1201, NULL, L"unicodeFFFE", NULL, 0, 0, IDS_DESC_1201, 1200, 0x00000000|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  628. { 65000, NULL, L"utf-7", NULL, 0, 0, IDS_DESC_65000, 1200, 0x00000101|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  629. { 65001, NULL, L"utf-8", NULL, 0, 0, IDS_DESC_65001, 1200, 0x00000303|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  630. { 20127, NULL, L"us-ascii", NULL, 0, 0, IDS_DESC_20127, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT|MIMECONTF_MAILNEWS|MIMECONTF_SAVABLE_MAILNEWS},
  631. { 50000, NULL, L"x-user-defined", NULL, IDS_FONT_WESTERN_FIXED, IDS_FONT_UNICODE_PROP, IDS_DESC_50000, 0, 0x00000707|MIMECONTF_MIME_LATEST| MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  632. { 1258, NULL, L"windows-1258", NULL, IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1258, 0, 0x00000303|MIMECONTF_MIME_LATEST|MIMECONTF_MIME_IE4|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  633. { 20005, NULL, L"x-cp20005", NULL, 0, 0, IDS_DESC_20005, 950, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  634. { 1252, NULL, L"iso-8859-1", NULL, IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1252_IE4, 0, 0x00000707| MIMECONTF_MIME_IE4},
  635. { 850, NULL, L"ibm850", NULL, 0, 0, IDS_DESC_850, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  636. { 20105, NULL, L"x-IA5", NULL, 0, 0, IDS_DESC_20105, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  637. { 28591, NULL, L"iso-8859-1", NULL, 0, 0, IDS_DESC_28591, 1252, 0x00000703|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  638. { 10000, NULL, L"macintosh", NULL, 0, 0, IDS_DESC_10000, 1252, MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT },
  639. { 1252, L"Windows-1252", L"iso-8859-1", L"Windows-1252", IDS_FONT_WESTERN_FIXED, IDS_FONT_WESTERN_PROP, IDS_DESC_1252, 0, 0x00000707|MIMECONTF_MIME_LATEST|MIMECONTF_IMPORT|MIMECONTF_EXPORT},
  640. { 0, 0, 0, 0, 0, 0, 0, 0, 0},
  641. // { CodePage, HeaderCharset, BodyCharset, WebCharset, FixedWidthFont, ProportionalFont, Description, FamilyCodePage, Flags }
  642. };
  643. #ifdef UNIX
  644. /* Convert from little endian to big endian format */
  645. #define CONVERTLONG(a,b,c,d) (((unsigned long )a) + \
  646. ((unsigned long )b << 8) + \
  647. ((unsigned long )c << 16) + \
  648. ((unsigned long )d << 24))
  649. #endif /* UNIX */
  650. //
  651. // Globals
  652. //
  653. CMimeDatabase *g_pMimeDatabase = NULL;
  654. //
  655. // CMimeDatabase implementation
  656. //
  657. STDAPI CMimeDatabase::GetNumberOfCodePageInfo(UINT *pcCodePage)
  658. {
  659. HRESULT hr = S_OK;
  660. if (pcCodePage)
  661. {
  662. *pcCodePage = 0;
  663. for (int i=0;i<ARRAYSIZE(MimeCodePage);i++)
  664. {
  665. if (MimeCodePage[i].dwFlags & dwMimeSource)
  666. (*pcCodePage)++;
  667. }
  668. }
  669. else
  670. hr = E_INVALIDARG;
  671. return hr;
  672. }
  673. STDAPI CMimeDatabase::GetCodePageInfo(UINT uiCodePage, LANGID LangId, PMIMECPINFO pcpInfo )
  674. {
  675. int idx;
  676. HRESULT hr = E_FAIL;
  677. DebugMsg(DM_TRACE, TEXT("CMimeDatabase::GetCodePageInfo called."));
  678. for (idx=0; idx < ARRAYSIZE(MimeCodePage); idx++)
  679. {
  680. if ((uiCodePage == MimeCodePage[idx].uiCodePage) &&
  681. (MimeCodePage[idx].dwFlags & dwMimeSource))
  682. break;
  683. }
  684. if (idx < ARRAYSIZE(MimeCodePage))
  685. {
  686. hr = GetCodePageInfoWithIndex(idx, LangId, pcpInfo);
  687. }
  688. return hr;
  689. }
  690. STDAPI CMimeDatabase::GetCodePageInfoWithIndex(UINT uidx, LANGID LangId, PMIMECPINFO pcpInfo)
  691. {
  692. HRESULT hr = E_FAIL;
  693. LANGID langid = LangId;
  694. CHARSETINFO rCharsetInfo;
  695. DebugMsg(DM_TRACE, TEXT("CMimeDatabase::GetCodePageInfoWithIndex called."));
  696. if (uidx >= ARRAYSIZE(MimeCodePage))
  697. return hr;
  698. if (!_LoadStringExW(g_hInst, MimeCodePage[uidx].uidDescription, pcpInfo->wszDescription, MAX_MIMECP_NAME, langid))
  699. {
  700. // Last try, switch to English, US
  701. langid = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
  702. if (!_LoadStringExW(g_hInst, MimeCodePage[uidx].uidDescription, pcpInfo->wszDescription, MAX_MIMECP_NAME, langid))
  703. return hr;
  704. }
  705. if ((0 == MimeCodePage[uidx].uidFixedWidthFont || 0 == MimeCodePage[uidx].uidProportionalFont))
  706. {
  707. pcpInfo->wszFixedWidthFont[0] = 0;
  708. pcpInfo->wszProportionalFont[0] = 0;
  709. if (0 != MimeCodePage[uidx].uiFamilyCodePage)
  710. {
  711. for (UINT j = 0; j < ARRAYSIZE(MimeCodePage); j++)
  712. {
  713. if (MimeCodePage[uidx].uiFamilyCodePage == MimeCodePage[j].uiCodePage)
  714. {
  715. _LoadStringExW(g_hInst, MimeCodePage[j].uidFixedWidthFont, pcpInfo->wszFixedWidthFont, MAX_MIMEFACE_NAME, langid);
  716. _LoadStringExW(g_hInst, MimeCodePage[j].uidProportionalFont, pcpInfo->wszProportionalFont, MAX_MIMEFACE_NAME, langid);
  717. break;
  718. }
  719. }
  720. }
  721. }
  722. else
  723. {
  724. _LoadStringExW(g_hInst, MimeCodePage[uidx].uidFixedWidthFont, pcpInfo->wszFixedWidthFont, MAX_MIMEFACE_NAME, langid);
  725. _LoadStringExW(g_hInst, MimeCodePage[uidx].uidProportionalFont, pcpInfo->wszProportionalFont, MAX_MIMEFACE_NAME,langid);
  726. }
  727. // Copy internal buffer information
  728. pcpInfo->dwFlags = MimeCodePage[uidx].dwFlags;
  729. pcpInfo->uiCodePage = MimeCodePage[uidx].uiCodePage;
  730. if (MimeCodePage[uidx].uiFamilyCodePage)
  731. pcpInfo->uiFamilyCodePage = MimeCodePage[uidx].uiFamilyCodePage;
  732. else
  733. pcpInfo->uiFamilyCodePage = MimeCodePage[uidx].uiCodePage;
  734. MLStrCpyNW(pcpInfo->wszBodyCharset, MimeCodePage[uidx].wszBodyCharset, MAX_MIMECSET_NAME);
  735. if (MimeCodePage[uidx].wszWebCharset)
  736. MLStrCpyNW(pcpInfo->wszWebCharset, MimeCodePage[uidx].wszWebCharset, MAX_MIMECSET_NAME);
  737. else
  738. MLStrCpyNW(pcpInfo->wszWebCharset, MimeCodePage[uidx].wszBodyCharset, MAX_MIMECSET_NAME);
  739. if (MimeCodePage[uidx].wszHeaderCharset)
  740. MLStrCpyNW(pcpInfo->wszHeaderCharset, MimeCodePage[uidx].wszHeaderCharset, MAX_MIMECSET_NAME);
  741. else
  742. MLStrCpyNW(pcpInfo->wszHeaderCharset, MimeCodePage[uidx].wszBodyCharset, MAX_MIMECSET_NAME);
  743. if (0 != TranslateCharsetInfo(IntToPtr_(LPDWORD, pcpInfo->uiFamilyCodePage), &rCharsetInfo, TCI_SRCCODEPAGE))
  744. pcpInfo->bGDICharset = (BYTE)rCharsetInfo.ciCharset;
  745. else
  746. pcpInfo->bGDICharset = DEFAULT_CHARSET;
  747. if (1200 == pcpInfo->uiFamilyCodePage || 50000 == pcpInfo->uiFamilyCodePage || TRUE == _IsValidCodePage(pcpInfo->uiFamilyCodePage)) // 50000 means user defined
  748. {
  749. if (TRUE == CheckFont(pcpInfo->bGDICharset))
  750. {
  751. if (pcpInfo->uiCodePage == pcpInfo->uiFamilyCodePage || TRUE == _IsValidCodePage(pcpInfo->uiCodePage))
  752. pcpInfo->dwFlags |= MIMECONTF_VALID|MIMECONTF_VALID_NLS;
  753. else if (S_OK == IsConvertINetStringAvailable(pcpInfo->uiCodePage, pcpInfo->uiFamilyCodePage))
  754. pcpInfo->dwFlags |= MIMECONTF_VALID|MIMECONTF_VALID_NLS;
  755. }
  756. else
  757. {
  758. if (pcpInfo->uiCodePage == pcpInfo->uiFamilyCodePage || TRUE == _IsValidCodePage(pcpInfo->uiCodePage))
  759. pcpInfo->dwFlags |= MIMECONTF_VALID_NLS;
  760. else if (S_OK == IsConvertINetStringAvailable(pcpInfo->uiCodePage, pcpInfo->uiFamilyCodePage))
  761. pcpInfo->dwFlags |= MIMECONTF_VALID_NLS;
  762. }
  763. }
  764. hr = S_OK;
  765. return hr;
  766. }
  767. STDAPI CMimeDatabase::GetCharsetInfo(BSTR Charset, PMIMECSETINFO pcsetInfo)
  768. {
  769. int idx = -1;
  770. int iStart, iEnd, iMiddle, iCmpResult;
  771. HRESULT hr = E_FAIL;
  772. DebugMsg(DM_TRACE, TEXT("CMimeDatabase::GetCharsetInfo called."));
  773. iStart = 0;
  774. iEnd = ARRAYSIZE(MimeCharSet) - 1;
  775. while (iStart <= iEnd)
  776. {
  777. iMiddle = (iStart + iEnd) / 2;
  778. iCmpResult = MLStrCmpIW(Charset, MimeCharSet[iMiddle].szCharset);
  779. if (iCmpResult < 0)
  780. iEnd = iMiddle - 1;
  781. else if (iCmpResult > 0)
  782. iStart = iMiddle + 1;
  783. else
  784. {
  785. if (MimeCharSet[iMiddle].dwFlags & dwMimeSource)
  786. {
  787. idx = iMiddle;
  788. }
  789. else
  790. // !!! Tricky, search neighbors for correct data which matches MIME version
  791. // Only works for now, if we have data over two versions, we have to change here
  792. if ((iMiddle+1 <= iEnd) &&
  793. MimeCharSet[iMiddle+1].dwFlags & dwMimeSource &&
  794. !MLStrCmpIW(Charset, MimeCharSet[iMiddle+1].szCharset))
  795. {
  796. idx = iMiddle+1;
  797. }
  798. else
  799. if ((iMiddle-1 >= 0) &&
  800. MimeCharSet[iMiddle-1].dwFlags & dwMimeSource &&
  801. !MLStrCmpIW(Charset, MimeCharSet[iMiddle-1].szCharset))
  802. {
  803. idx = iMiddle-1;
  804. }
  805. else
  806. {
  807. idx = ARRAYSIZE(MimeCharSet);
  808. }
  809. break;
  810. }
  811. }
  812. if (0 <= idx && idx < ARRAYSIZE(MimeCharSet) && pcsetInfo )
  813. {
  814. MLStrCpyNW(pcsetInfo->wszCharset, MimeCharSet[idx].szCharset, MAX_MIMECSET_NAME);
  815. pcsetInfo->uiCodePage = MimeCharSet[idx].uiCodePage;
  816. pcsetInfo->uiInternetEncoding = MimeCharSet[idx].uiInternetEncoding;
  817. hr = S_OK;
  818. }
  819. return hr;
  820. }
  821. int CALLBACK EnumFontFamExProc(ENUMLOGFONTEX *lpelf, NEWTEXTMETRICEX *lpntm, int iFontType, LPARAM lParam)
  822. {
  823. LOGFONT *lplf;
  824. BOOL *lpfOK = (BOOL *)lParam;
  825. lplf = &(lpelf->elfLogFont);
  826. // We don't use non TrueType fonts
  827. if (iFontType == DEVICE_FONTTYPE || iFontType == RASTER_FONTTYPE)
  828. return 1; // keep going but don't use this font
  829. // We don't use the SYMBOL, Mac Charset fonts
  830. if(lplf->lfCharSet == SYMBOL_CHARSET || lplf->lfCharSet == MAC_CHARSET)
  831. return 1;
  832. // We don't handle vertical fonts
  833. if (TEXT('@') == lplf->lfFaceName[0])
  834. return 1;
  835. *lpfOK = TRUE;
  836. return 0; // stop enumeration if we find any
  837. }
  838. BOOL CMimeDatabase::CheckFont(BYTE bGDICharset)
  839. {
  840. BOOL fRet = FALSE;
  841. DebugMsg(DM_TRACE, TEXT("CMimeDatabase::CheckFont called."));
  842. // It is safe to assume that system always support DEFAULT_CHAR and ANSI_CHARSET
  843. if ((DEFAULT_CHARSET == bGDICharset) || (ANSI_CHARSET == bGDICharset))
  844. fRet = TRUE;
  845. else
  846. {
  847. HDC hDC;
  848. LOGFONT lf;
  849. HWND hWnd;
  850. hWnd = GetTopWindow(GetDesktopWindow());
  851. hDC = GetDC(hWnd);
  852. if (NULL != hDC)
  853. {
  854. lf.lfFaceName[0] = TEXT('\0');
  855. lf.lfPitchAndFamily = 0;
  856. lf.lfCharSet = bGDICharset;
  857. EnumFontFamiliesEx(hDC, &lf, (FONTENUMPROC)EnumFontFamExProc, (LPARAM)&fRet, 0);
  858. }
  859. ReleaseDC(hWnd, hDC);
  860. }
  861. return fRet;
  862. }
  863. // validates all cps that are in the same
  864. // family of the given codepage
  865. STDAPI CMimeDatabase::ValidateCP(UINT uiCodePage)
  866. {
  867. UINT i;
  868. for (i = 0; i < ARRAYSIZE(MimeCodePage); i++)
  869. {
  870. if (MimeCodePage[i].uiFamilyCodePage == uiCodePage)
  871. MimeCodePage[i].dwFlags |= MIMECONTF_VALID|MIMECONTF_VALID_NLS;
  872. }
  873. return S_OK; // never fail?
  874. }