1. /*
  2. * @(#)CollationRules.java 1.22 00/01/19
  3. *
  4. * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. /*
  11. * (C) Copyright Taligent, Inc. 1996,1997 - All Rights Reserved
  12. * (C) Copyright IBM Corp. 1996, 1997 - All Rights Reserved
  13. *
  14. * The original version of this source code and documentation is copyrighted
  15. * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
  16. * materials are provided under terms of a License Agreement between Taligent
  17. * and Sun. This technology is protected by multiple US and International
  18. * patents. This notice and attribution to Taligent may not be removed.
  19. * Taligent is a registered trademark of Taligent, Inc.
  20. *
  21. */
  22. package java.text;
  23. /**
  24. * CollationRules contains the default en_US collation rules as a base
  25. * for building other collation tables.
  26. * <p>Note that decompositions are done before these rules are used,
  27. * so they do not have to contain accented characters, such as A-grave.
  28. * @see RuleBasedCollator
  29. * @see LocaleElements
  30. * @version 1.22, 01/19/00
  31. * @author Helena Shih, Mark Davis
  32. */
  33. final class CollationRules {
  34. final static String DEFAULTRULES = new String(
  35. "" // no FRENCH accent order by default, add in French Delta
  36. // IGNORABLES (up to first < character)
  37. // COMPLETELY IGNORE format characters
  38. + "='\u200B'=\u200C=\u200D=\u200E=\u200F"
  39. // Control Characters
  40. + "=\u0000 =\u0001 =\u0002 =\u0003 =\u0004" //null, .. eot
  41. + "=\u0005 =\u0006 =\u0007 =\u0008 ='\u0009'" //enq, ...
  42. + "='\u000b' =\u000e" //vt,, so
  43. + "=\u000f ='\u0010' =\u0011 =\u0012 =\u0013" //si, dle, dc1, dc2, dc3
  44. + "=\u0014 =\u0015 =\u0016 =\u0017 =\u0018" //dc4, nak, syn, etb, can
  45. + "=\u0019 =\u001a =\u001b =\u001c =\u001d" //em, sub, esc, fs, gs
  46. + "=\u001e =\u001f =\u007f" //rs, us, del
  47. //....then the C1 Latin 1 reserved control codes
  48. + "=\u0080 =\u0081 =\u0082 =\u0083 =\u0084 =\u0085"
  49. + "=\u0086 =\u0087 =\u0088 =\u0089 =\u008a =\u008b"
  50. + "=\u008c =\u008d =\u008e =\u008f =\u0090 =\u0091"
  51. + "=\u0092 =\u0093 =\u0094 =\u0095 =\u0096 =\u0097"
  52. + "=\u0098 =\u0099 =\u009a =\u009b =\u009c =\u009d"
  53. + "=\u009e =\u009f"
  54. // IGNORE except for secondary, tertiary difference
  55. // Spaces
  56. + ";'\u0020';'\u00A0'" // spaces
  57. + ";'\u2000';'\u2001';'\u2002';'\u2003';'\u2004'" // spaces
  58. + ";'\u2005';'\u2006';'\u2007';'\u2008';'\u2009'" // spaces
  59. + ";'\u200A';'\u3000';'\uFEFF'" // spaces
  60. + ";'\r' ;'\t' ;'\n';'\f';'\u000b'" // whitespace
  61. // Non-spacing accents
  62. + ";\u0301" // non-spacing acute accent
  63. + ";\u0300" // non-spacing grave accent
  64. + ";\u0306" // non-spacing breve accent
  65. + ";\u0302" // non-spacing circumflex accent
  66. + ";\u030c" // non-spacing caron/hacek accent
  67. + ";\u030a" // non-spacing ring above accent
  68. + ";\u030d" // non-spacing vertical line above
  69. + ";\u0308" // non-spacing diaeresis accent
  70. + ";\u030b" // non-spacing double acute accent
  71. + ";\u0303" // non-spacing tilde accent
  72. + ";\u0307" // non-spacing dot above/overdot accent
  73. + ";\u0304" // non-spacing macron accent
  74. + ";\u0337" // non-spacing short slash overlay (overstruck diacritic)
  75. + ";\u0327" // non-spacing cedilla accent
  76. + ";\u0328" // non-spacing ogonek accent
  77. + ";\u0323" // non-spacing dot-below/underdot accent
  78. + ";\u0332" // non-spacing underscore/underline accent
  79. // with the rest of the general diacritical marks in binary order
  80. + ";\u0305" // non-spacing overscore/overline
  81. + ";\u0309" // non-spacing hook above
  82. + ";\u030e" // non-spacing double vertical line above
  83. + ";\u030f" // non-spacing double grave
  84. + ";\u0310" // non-spacing chandrabindu
  85. + ";\u0311" // non-spacing inverted breve
  86. + ";\u0312" // non-spacing turned comma above/cedilla above
  87. + ";\u0313" // non-spacing comma above
  88. + ";\u0314" // non-spacing reversed comma above
  89. + ";\u0315" // non-spacing comma above right
  90. + ";\u0316" // non-spacing grave below
  91. + ";\u0317" // non-spacing acute below
  92. + ";\u0318" // non-spacing left tack below
  93. + ";\u0319" // non-spacing tack below
  94. + ";\u031a" // non-spacing left angle above
  95. + ";\u031b" // non-spacing horn
  96. + ";\u031c" // non-spacing left half ring below
  97. + ";\u031d" // non-spacing up tack below
  98. + ";\u031e" // non-spacing down tack below
  99. + ";\u031f" // non-spacing plus sign below
  100. + ";\u0320" // non-spacing minus sign below
  101. + ";\u0321" // non-spacing palatalized hook below
  102. + ";\u0322" // non-spacing retroflex hook below
  103. + ";\u0324" // non-spacing double dot below
  104. + ";\u0325" // non-spacing ring below
  105. + ";\u0326" // non-spacing comma below
  106. + ";\u0329" // non-spacing vertical line below
  107. + ";\u032a" // non-spacing bridge below
  108. + ";\u032b" // non-spacing inverted double arch below
  109. + ";\u032c" // non-spacing hacek below
  110. + ";\u032d" // non-spacing circumflex below
  111. + ";\u032e" // non-spacing breve below
  112. + ";\u032f" // non-spacing inverted breve below
  113. + ";\u0330" // non-spacing tilde below
  114. + ";\u0331" // non-spacing macron below
  115. + ";\u0333" // non-spacing double underscore
  116. + ";\u0334" // non-spacing tilde overlay
  117. + ";\u0335" // non-spacing short bar overlay
  118. + ";\u0336" // non-spacing long bar overlay
  119. + ";\u0338" // non-spacing long slash overlay
  120. + ";\u0339" // non-spacing right half ring below
  121. + ";\u033a" // non-spacing inverted bridge below
  122. + ";\u033b" // non-spacing square below
  123. + ";\u033c" // non-spacing seagull below
  124. + ";\u033d" // non-spacing x above
  125. + ";\u033e" // non-spacing vertical tilde
  126. + ";\u033f" // non-spacing double overscore
  127. + ";\u0340" // non-spacing grave tone mark
  128. + ";\u0341" // non-spacing acute tone mark
  129. + ";\u0342;\u0343;\u0344;\u0345;\u0360;\u0361" // newer
  130. + ";\u0483;\u0484;\u0485;\u0486" // Cyrillic accents
  131. + ";\u20D0;\u20D1;\u20D2" // symbol accents
  132. + ";\u20D3;\u20D4;\u20D5" // symbol accents
  133. + ";\u20D6;\u20D7;\u20D8" // symbol accents
  134. + ";\u20D9;\u20DA;\u20DB" // symbol accents
  135. + ";\u20DC;\u20DD;\u20DE" // symbol accents
  136. + ";\u20DF;\u20E0;\u20E1" // symbol accents
  137. + ",'\u002D';\u00AD" // dashes
  138. + ";\u2010;\u2011;\u2012" // dashes
  139. + ";\u2013;\u2014;\u2015" // dashes
  140. + ";\u2212" // dashes
  141. // other punctuation
  142. + "<'\u005f'" // underline/underscore (spacing)
  143. + "<\u00af" // overline or macron (spacing)
  144. + "<'\u002c'" // comma (spacing)
  145. + "<'\u003b'" // semicolon
  146. + "<'\u003a'" // colon
  147. + "<'\u0021'" // exclamation point
  148. + "<\u00a1" // inverted exclamation point
  149. + "<'\u003f'" // question mark
  150. + "<\u00bf" // inverted question mark
  151. + "<'\u002f'" // slash
  152. + "<'\u002e'" // period/full stop
  153. + "<\u00b4" // acute accent (spacing)
  154. + "<'\u0060'" // grave accent (spacing)
  155. + "<'\u005e'" // circumflex accent (spacing)
  156. + "<\u00a8" // diaresis/umlaut accent (spacing)
  157. + "<'\u007e'" // tilde accent (spacing)
  158. + "<\u00b7" // middle dot (spacing)
  159. + "<\u00b8" // cedilla accent (spacing)
  160. + "<'\u0027'" // apostrophe
  161. + "<'\"'" // quotation marks
  162. + "<\u00ab" // left angle quotes
  163. + "<\u00bb" // right angle quotes
  164. + "<'\u0028'" // left parenthesis
  165. + "<'\u0029'" // right parenthesis
  166. + "<'\u005b'" // left bracket
  167. + "<'\u005d'" // right bracket
  168. + "<'\u007b'" // left brace
  169. + "<'\u007d'" // right brace
  170. + "<\u00a7" // section symbol
  171. + "<\u00b6" // paragraph symbol
  172. + "<\u00a9" // copyright symbol
  173. + "<\u00ae" // registered trademark symbol
  174. + "<'\u0040'" // at sign
  175. + "<\u00a4" // international currency symbol
  176. + "<\u0e3f" // baht sign
  177. + "<\u00a2" // cent sign
  178. + "<\u20a1" // colon sign
  179. + "<\u20a2" // cruzeiro sign
  180. + "<'\u0024'" // dollar sign
  181. + "<\u20ab" // dong sign
  182. + "<\u20ac" // euro sign
  183. + "<\u20a3" // franc sign
  184. + "<\u20a4" // lira sign
  185. + "<\u20a5" // mill sign
  186. + "<\u20a6" // naira sign
  187. + "<\u20a7" // peseta sign
  188. + "<\u00a3" // pound-sterling sign
  189. + "<\u20a8" // rupee sign
  190. + "<\u20aa" // new shekel sign
  191. + "<\u20a9" // won sign
  192. + "<\u00a5" // yen sign
  193. + "<'\u002a'" // asterisk
  194. + "<'\\'" // backslash
  195. + "<'\u0026'" // ampersand
  196. + "<'\u0023'" // number sign
  197. + "<'\u0025'" // percent sign
  198. + "<'\u002b'" // plus sign
  199. + "<\u00b1" // plus-or-minus sign
  200. + "<\u00f7" // divide sign
  201. + "<\u00d7" // multiply sign
  202. + "<'\u003c'" // less-than sign
  203. + "<'\u003d'" // equal sign
  204. + "<'\u003e'" // greater-than sign
  205. + "<\u00ac" // end of line symbol/logical NOT symbol
  206. + "<'\u007c'" // vertical line/logical OR symbol
  207. + "<\u00a6" // broken vertical line
  208. + "<\u00b0" // degree symbol
  209. + "<\u00b5" // micro symbol
  210. // NUMERICS
  211. + "<0<1<2<3<4<5<6<7<8<9"
  212. + "<\u00bc<\u00bd<\u00be" // 1/4,1/2,3/4 fractions
  213. // NON-IGNORABLES
  214. + "<a,A"
  215. + "<b,B"
  216. + "<c,C"
  217. + "<d,D"
  218. + "<\u00F0,\u00D0" // eth
  219. + "<e,E"
  220. + "<f,F"
  221. + "<g,G"
  222. + "<h,H"
  223. + "<i,I"
  224. + "<j,J"
  225. + "<k,K"
  226. + "<l,L"
  227. + "<m,M"
  228. + "<n,N"
  229. + "<o,O"
  230. + "<p,P"
  231. + "<q,Q"
  232. + "<r,R"
  233. + "<s, S & SS,\u00DF" // s-zet
  234. + "<t,T"
  235. + "& TH, \u00DE &TH, \u00FE " // thorn
  236. + "<u,U"
  237. + "<v,V"
  238. + "<w,W"
  239. + "<x,X"
  240. + "<y,Y"
  241. + "<z,Z"
  242. + "&AE,\u00C6" // ae & AE ligature
  243. + "&AE,\u00E6"
  244. + "&OE,\u0152" // oe & OE ligature
  245. + "&OE,\u0153"
  246. );
  247. }