KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > charcode > CP1251CharacterSet


1 package net.sf.saxon.charcode;
2
3 /**
4 * This class defines properties of the CP1251 Cyrillic character set,
5 * as defined at <a HREF="http://www.microsoft.com/globaldev/reference/sbcs/1251.htm">http://www.microsoft.com/globaldev/reference/sbcs/1251.htm</a>.
6 */

7
8 public class CP1251CharacterSet implements CharacterSet {
9
10     public static CP1251CharacterSet theInstance = new CP1251CharacterSet();
11
12     private CP1251CharacterSet() {}
13
14     public static CP1251CharacterSet getInstance() {
15         return theInstance;
16     }
17
18     public final boolean inCharset(int c) {
19     return ( c <= 0x7f ) ||
20             (c >= 0x0401 && c <= 0x044F) ||
21             (c >= 0x0451 && c <= 0x045f) ||
22             (c == 0x0490) ||
23             (c == 0x0491) ||
24             (c == 0x2013) ||
25             (c == 0x2014) ||
26             (c == 0x2018) ||
27             (c == 0x2019) ||
28             (c == 0x201A) ||
29             (c == 0x201C) ||
30             (c == 0x201D) ||
31             (c == 0x201E) ||
32             (c == 0x2020) ||
33             (c == 0x2021) ||
34             (c == 0x2022) ||
35             (c == 0x2026) ||
36             (c == 0x2030) ||
37             (c == 0x2039) ||
38             (c == 0x203A) ||
39             (c == 0x20AC) ||
40             (c == 0x2116) ||
41             (c == 0x2122);
42   }
43
44 }
45
46 // 80 = U+0402 : CYRILLIC CAPITAL LETTER DJE
47
// 81 = U+0403 : CYRILLIC CAPITAL LETTER GJE
48
// 82 = U+201A : SINGLE LOW-9 QUOTATION MARK
49
// 83 = U+0453 : CYRILLIC SMALL LETTER GJE
50
// 84 = U+201E : DOUBLE LOW-9 QUOTATION MARK
51
// 85 = U+2026 : HORIZONTAL ELLIPSIS
52
// 86 = U+2020 : DAGGER
53
// 87 = U+2021 : DOUBLE DAGGER
54
// 88 = U+20AC : EURO SIGN
55
// 89 = U+2030 : PER MILLE SIGN
56
// 8A = U+0409 : CYRILLIC CAPITAL LETTER LJE
57
// 8B = U+2039 : SINGLE LEFT-POINTING ANGLE QUOTATION MARK
58
// 8C = U+040A : CYRILLIC CAPITAL LETTER NJE
59
// 8D = U+040C : CYRILLIC CAPITAL LETTER KJE
60
// 8E = U+040B : CYRILLIC CAPITAL LETTER TSHE
61
// 8F = U+040F : CYRILLIC CAPITAL LETTER DZHE
62
// 90 = U+0452 : CYRILLIC SMALL LETTER DJE
63
// 91 = U+2018 : LEFT SINGLE QUOTATION MARK
64
// 92 = U+2019 : RIGHT SINGLE QUOTATION MARK
65
// 93 = U+201C : LEFT DOUBLE QUOTATION MARK
66
// 94 = U+201D : RIGHT DOUBLE QUOTATION MARK
67
// 95 = U+2022 : BULLET
68
// 96 = U+2013 : EN DASH
69
// 97 = U+2014 : EM DASH
70
// 99 = U+2122 : TRADE MARK SIGN
71
// 9A = U+0459 : CYRILLIC SMALL LETTER LJE
72
// 9B = U+203A : SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
73
// 9C = U+045A : CYRILLIC SMALL LETTER NJE
74
// 9D = U+045C : CYRILLIC SMALL LETTER KJE
75
// 9E = U+045B : CYRILLIC SMALL LETTER TSHE
76
// 9F = U+045F : CYRILLIC SMALL LETTER DZHE
77
// A0 = U+00A0 : NO-BREAK SPACE
78
// A1 = U+040E : CYRILLIC CAPITAL LETTER SHORT U
79
// A2 = U+045E : CYRILLIC SMALL LETTER SHORT U
80
// A3 = U+0408 : CYRILLIC CAPITAL LETTER JE
81
// A4 = U+00A4 : CURRENCY SIGN
82
// A5 = U+0490 : CYRILLIC CAPITAL LETTER GHE WITH UPTURN
83
// A6 = U+00A6 : BROKEN BAR
84
// A7 = U+00A7 : SECTION SIGN
85
// A8 = U+0401 : CYRILLIC CAPITAL LETTER IO
86
// A9 = U+00A9 : COPYRIGHT SIGN
87
// AA = U+0404 : CYRILLIC CAPITAL LETTER UKRAINIAN IE
88
// AB = U+00AB : LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
89
// AC = U+00AC : NOT SIGN
90
// AD = U+00AD : SOFT HYPHEN
91
// AE = U+00AE : REGISTERED SIGN
92
// AF = U+0407 : CYRILLIC CAPITAL LETTER YI
93
// B0 = U+00B0 : DEGREE SIGN
94
// B1 = U+00B1 : PLUS-MINUS SIGN
95
// B2 = U+0406 : CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
96
// B3 = U+0456 : CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
97
// B4 = U+0491 : CYRILLIC SMALL LETTER GHE WITH UPTURN
98
// B5 = U+00B5 : MICRO SIGN
99
// B6 = U+00B6 : PILCROW SIGN
100
// B7 = U+00B7 : MIDDLE DOT
101
// B8 = U+0451 : CYRILLIC SMALL LETTER IO
102
// B9 = U+2116 : NUMERO SIGN
103
// BA = U+0454 : CYRILLIC SMALL LETTER UKRAINIAN IE
104
// BB = U+00BB : RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
105
// BC = U+0458 : CYRILLIC SMALL LETTER JE
106
// BD = U+0405 : CYRILLIC CAPITAL LETTER DZE
107
// BE = U+0455 : CYRILLIC SMALL LETTER DZE
108
// BF = U+0457 : CYRILLIC SMALL LETTER YI
109
// C0 = U+0410 : CYRILLIC CAPITAL LETTER A
110
// C1 = U+0411 : CYRILLIC CAPITAL LETTER BE
111
// C2 = U+0412 : CYRILLIC CAPITAL LETTER VE
112
// C3 = U+0413 : CYRILLIC CAPITAL LETTER GHE
113
// C4 = U+0414 : CYRILLIC CAPITAL LETTER DE
114
// C5 = U+0415 : CYRILLIC CAPITAL LETTER IE
115
// C6 = U+0416 : CYRILLIC CAPITAL LETTER ZHE
116
// C7 = U+0417 : CYRILLIC CAPITAL LETTER ZE
117
// C8 = U+0418 : CYRILLIC CAPITAL LETTER I
118
// C9 = U+0419 : CYRILLIC CAPITAL LETTER SHORT I
119
// CA = U+041A : CYRILLIC CAPITAL LETTER KA
120
// CB = U+041B : CYRILLIC CAPITAL LETTER EL
121
// CC = U+041C : CYRILLIC CAPITAL LETTER EM
122
// CD = U+041D : CYRILLIC CAPITAL LETTER EN
123
// CE = U+041E : CYRILLIC CAPITAL LETTER O
124
// CF = U+041F : CYRILLIC CAPITAL LETTER PE
125
// D0 = U+0420 : CYRILLIC CAPITAL LETTER ER
126
// D1 = U+0421 : CYRILLIC CAPITAL LETTER ES
127
// D2 = U+0422 : CYRILLIC CAPITAL LETTER TE
128
// D3 = U+0423 : CYRILLIC CAPITAL LETTER U
129
// D4 = U+0424 : CYRILLIC CAPITAL LETTER EF
130
// D5 = U+0425 : CYRILLIC CAPITAL LETTER HA
131
// D6 = U+0426 : CYRILLIC CAPITAL LETTER TSE
132
// D7 = U+0427 : CYRILLIC CAPITAL LETTER CHE
133
// D8 = U+0428 : CYRILLIC CAPITAL LETTER SHA
134
// D9 = U+0429 : CYRILLIC CAPITAL LETTER SHCHA
135
// DA = U+042A : CYRILLIC CAPITAL LETTER HARD SIGN
136
// DB = U+042B : CYRILLIC CAPITAL LETTER YERU
137
// DC = U+042C : CYRILLIC CAPITAL LETTER SOFT SIGN
138
// DD = U+042D : CYRILLIC CAPITAL LETTER E
139
// DE = U+042E : CYRILLIC CAPITAL LETTER YU
140
// DF = U+042F : CYRILLIC CAPITAL LETTER YA
141
// E0 = U+0430 : CYRILLIC SMALL LETTER A
142
// E1 = U+0431 : CYRILLIC SMALL LETTER BE
143
// E2 = U+0432 : CYRILLIC SMALL LETTER VE
144
// E3 = U+0433 : CYRILLIC SMALL LETTER GHE
145
// E4 = U+0434 : CYRILLIC SMALL LETTER DE
146
// E5 = U+0435 : CYRILLIC SMALL LETTER IE
147
// E6 = U+0436 : CYRILLIC SMALL LETTER ZHE
148
// E7 = U+0437 : CYRILLIC SMALL LETTER ZE
149
// E8 = U+0438 : CYRILLIC SMALL LETTER I
150
// E9 = U+0439 : CYRILLIC SMALL LETTER SHORT I
151
// EA = U+043A : CYRILLIC SMALL LETTER KA
152
// EB = U+043B : CYRILLIC SMALL LETTER EL
153
// EC = U+043C : CYRILLIC SMALL LETTER EM
154
// ED = U+043D : CYRILLIC SMALL LETTER EN
155
// EE = U+043E : CYRILLIC SMALL LETTER O
156
// EF = U+043F : CYRILLIC SMALL LETTER PE
157
// F0 = U+0440 : CYRILLIC SMALL LETTER ER
158
// F1 = U+0441 : CYRILLIC SMALL LETTER ES
159
// F2 = U+0442 : CYRILLIC SMALL LETTER TE
160
// F3 = U+0443 : CYRILLIC SMALL LETTER U
161
// F4 = U+0444 : CYRILLIC SMALL LETTER EF
162
// F5 = U+0445 : CYRILLIC SMALL LETTER HA
163
// F6 = U+0446 : CYRILLIC SMALL LETTER TSE
164
// F7 = U+0447 : CYRILLIC SMALL LETTER CHE
165
// F8 = U+0448 : CYRILLIC SMALL LETTER SHA
166
// F9 = U+0449 : CYRILLIC SMALL LETTER SHCHA
167
// FA = U+044A : CYRILLIC SMALL LETTER HARD SIGN
168
// FB = U+044B : CYRILLIC SMALL LETTER YERU
169
// FC = U+044C : CYRILLIC SMALL LETTER SOFT SIGN
170
// FD = U+044D : CYRILLIC SMALL LETTER E
171
// FE = U+044E : CYRILLIC SMALL LETTER YU
172
// FF = U+044F : CYRILLIC SMALL LETTER YA
173

174
175
176
177 //
178
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
179
// you may not use this file except in compliance with the License. You may obtain a copy of the
180
// License at http://www.mozilla.org/MPL/
181
//
182
// Software distributed under the License is distributed on an "AS IS" basis,
183
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
184
// See the License for the specific language governing rights and limitations under the License.
185
//
186
// The Original Code is: all this file.
187
//
188
// The Initial Developer of the Original Code is
189
// Aleksei Makarov [makarov@iitam.omsk.net.ru]
190
//
191
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
192
//
193
// Contributor(s): none.
194
//
195
Popular Tags