2
0

Charsets.cs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /* ***** BEGIN LICENSE BLOCK *****
  2. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3. *
  4. * The contents of this file are subject to the Mozilla Public License Version
  5. * 1.1 (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. * http://www.mozilla.org/MPL/
  8. *
  9. * Software distributed under the License is distributed on an "AS IS" basis,
  10. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. * for the specific language governing rights and limitations under the
  12. * License.
  13. *
  14. * The Original Code is mozilla.org code.
  15. *
  16. * The Initial Developer of the Original Code is
  17. * Netscape Communications Corporation.
  18. * Portions created by the Initial Developer are Copyright (C) 1998
  19. * the Initial Developer. All Rights Reserved.
  20. *
  21. * Contributor(s):
  22. * Rudi Pettazzi <rudi.pettazzi@gmail.com> (C# port)
  23. *
  24. * Alternatively, the contents of this file may be used under the terms of
  25. * either the GNU General Public License Version 2 or later (the "GPL"), or
  26. * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27. * in which case the provisions of the GPL or the LGPL are applicable instead
  28. * of those above. If you wish to allow use of your version of this file only
  29. * under the terms of either the GPL or the LGPL, and not to allow others to
  30. * use your version of this file under the terms of the MPL, indicate your
  31. * decision by deleting the provisions above and replace them with the notice
  32. * and other provisions required by the GPL or the LGPL. If you do not delete
  33. * the provisions above, a recipient may use your version of this file under
  34. * the terms of any one of the MPL, the GPL or the LGPL.
  35. *
  36. * ***** END LICENSE BLOCK ***** */
  37. namespace UniversalDetector.Core
  38. {
  39. public static class Charsets
  40. {
  41. public const string ASCII = "ASCII";
  42. public const string UTF8 = "UTF-8";
  43. public const string UTF16_LE = "UTF-16LE";
  44. public const string UTF16_BE = "UTF-16BE";
  45. public const string UTF32_BE = "UTF-32BE";
  46. public const string UTF32_LE = "UTF-32LE";
  47. /// <summary>
  48. /// Unusual BOM (3412 order)
  49. /// </summary>
  50. public const string UCS4_3412 = "X-ISO-10646-UCS-4-3412";
  51. /// <summary>
  52. /// Unusual BOM (2413 order)
  53. /// </summary>
  54. public const string UCS4_2413 = "X-ISO-10646-UCS-4-2413";
  55. /// <summary>
  56. /// Cyrillic (based on bulgarian and russian data)
  57. /// </summary>
  58. public const string WIN1251 = "windows-1251";
  59. /// <summary>
  60. /// Latin-1, almost identical to ISO-8859-1
  61. /// </summary>
  62. public const string WIN1252 = "windows-1252";
  63. /// <summary>
  64. /// Greek
  65. /// </summary>
  66. public const string WIN1253 = "windows-1253";
  67. /// <summary>
  68. /// Logical hebrew (includes ISO-8859-8-I and most of x-mac-hebrew)
  69. /// </summary>
  70. public const string WIN1255 = "windows-1255";
  71. /// <summary>
  72. /// Traditional chinese
  73. /// </summary>
  74. public const string BIG5 = "Big-5";
  75. public const string EUCKR = "EUC-KR";
  76. public const string EUCJP = "EUC-JP";
  77. public const string EUCTW = "EUC-TW";
  78. /// <summary>
  79. /// Note: gb2312 is a subset of gb18030
  80. /// </summary>
  81. public const string GB18030 = "gb18030";
  82. public const string ISO2022_JP = "ISO-2022-JP";
  83. public const string ISO2022_CN = "ISO-2022-CN";
  84. public const string ISO2022_KR = "ISO-2022-KR";
  85. /// <summary>
  86. /// Simplified chinese
  87. /// </summary>
  88. public const string HZ_GB_2312 = "HZ-GB-2312";
  89. public const string SHIFT_JIS = "Shift-JIS";
  90. public const string MAC_CYRILLIC = "x-mac-cyrillic";
  91. public const string KOI8R = "KOI8-R";
  92. public const string IBM855 = "IBM855";
  93. public const string IBM866 = "IBM866";
  94. /// <summary>
  95. /// East-Europe. Disabled because too similar to windows-1252
  96. /// (latin-1). Should use tri-grams models to discriminate between
  97. /// these two charsets.
  98. /// </summary>
  99. public const string ISO8859_2 = "ISO-8859-2";
  100. /// <summary>
  101. /// Cyrillic
  102. /// </summary>
  103. public const string ISO8859_5 = "ISO-8859-5";
  104. /// <summary>
  105. /// Greek
  106. /// </summary>
  107. public const string ISO_8859_7 = "ISO-8859-7";
  108. /// <summary>
  109. /// Visual Hebrew
  110. /// </summary>
  111. public const string ISO8859_8 = "ISO-8859-8";
  112. /// <summary>
  113. /// Thai. This recognizer is not enabled yet.
  114. /// </summary>
  115. public const string TIS620 = "TIS620";
  116. }
  117. }