KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icl > saxon > charcode > CP1251CharacterSet


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

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

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