KickJava   Java API By Example, From Geeks To Geeks.

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


1 package net.sf.saxon.charcode;
2
3 /**
4  * This class defines properties of the CP1252 (Latin 1) character set,
5  * as defined at <a ref="http://www.microsoft.com/globaldev/reference/sbcs/1252.htm">http://www.microsoft.com/globaldev/reference/sbcs/1252.htm</a>.
6  *
7  * <p>This file was kindly provided by Sectra AB, Sweden to the DocBook community.
8  * Author: Pontus Haglund</p>
9  */

10
11 public class CP1252CharacterSet implements CharacterSet {
12
13     public static CP1252CharacterSet theInstance = new CP1252CharacterSet();
14
15     private CP1252CharacterSet() {
16     }
17
18     public static CP1252CharacterSet getInstance() {
19         return theInstance;
20     }
21
22
23     public final boolean inCharset(int c) {
24
25         return (c >= 0x00 && c <= 0x7F) ||
26                 (c >= 0xA0 && c <= 0xFF) ||
27                 (c == 0x20AC) ||
28                 (c == 0x201A) ||
29                 (c == 0x0192) ||
30                 (c == 0x201E) ||
31                 (c == 0x2026) ||
32                 (c == 0x2020) ||
33                 (c == 0x2021) ||
34                 (c == 0x02C6) ||
35                 (c == 0x2030) ||
36                 (c == 0x0160) ||
37                 (c == 0x2039) ||
38                 (c == 0x0152) ||
39                 (c == 0x017D) ||
40                 (c == 0x2018) ||
41                 (c == 0x2019) ||
42                 (c == 0x201C) ||
43                 (c == 0x201D) ||
44                 (c == 0x2022) ||
45                 (c == 0x2013) ||
46                 (c == 0x2014) ||
47                 (c == 0x02DC) ||
48                 (c == 0x2122) ||
49                 (c == 0x0161) ||
50                 (c == 0x203A) ||
51                 (c == 0x0153) ||
52                 (c == 0x017E) ||
53                 (c == 0x0178);
54
55
56     }
57 }
58
59 //00 = U+0000 : NULL
60
//01 = U+0001 : START OF HEADING
61
//02 = U+0002 : START OF TEXT
62
//03 = U+0003 : END OF TEXT
63
//04 = U+0004 : END OF TRANSMISSION
64
//05 = U+0005 : ENQUIRY
65
//06 = U+0006 : ACKNOWLEDGE
66
//07 = U+0007 : BELL
67
//08 = U+0008 : BACKSPACE
68
//09 = U+0009 : HORIZONTAL TABULATION
69
//0A = U+000A : LINE FEED
70
//0B = U+000B : VERTICAL TABULATION
71
//0C = U+000C : FORM FEED
72
//0D = U+000D : CARRIAGE RETURN
73
//0E = U+000E : SHIFT OUT
74
//0F = U+000F : SHIFT IN
75
//10 = U+0010 : DATA LINK ESCAPE
76
//11 = U+0011 : DEVICE CONTROL ONE
77
//12 = U+0012 : DEVICE CONTROL TWO
78
//13 = U+0013 : DEVICE CONTROL THREE
79
//14 = U+0014 : DEVICE CONTROL FOUR
80
//15 = U+0015 : NEGATIVE ACKNOWLEDGE
81
//16 = U+0016 : SYNCHRONOUS IDLE
82
//17 = U+0017 : END OF TRANSMISSION BLOCK
83
//18 = U+0018 : CANCEL
84
//19 = U+0019 : END OF MEDIUM
85
//1A = U+001A : SUBSTITUTE
86
//1B = U+001B : ESCAPE
87
//1C = U+001C : FILE SEPARATOR
88
//1D = U+001D : GROUP SEPARATOR
89
//1E = U+001E : RECORD SEPARATOR
90
//1F = U+001F : UNIT SEPARATOR
91
//20 = U+0020 : SPACE
92
//21 = U+0021 : EXCLAMATION MARK
93
//22 = U+0022 : QUOTATION MARK
94
//23 = U+0023 : NUMBER SIGN
95
//24 = U+0024 : DOLLAR SIGN
96
//25 = U+0025 : PERCENT SIGN
97
//26 = U+0026 : AMPERSAND
98
//27 = U+0027 : APOSTROPHE
99
//28 = U+0028 : LEFT PARENTHESIS
100
//29 = U+0029 : RIGHT PARENTHESIS
101
//2A = U+002A : ASTERISK
102
//2B = U+002B : PLUS SIGN
103
//2C = U+002C : COMMA
104
//2D = U+002D : HYPHEN-MINUS
105
//2E = U+002E : FULL STOP
106
//2F = U+002F : SOLIDUS
107
//30 = U+0030 : DIGIT ZERO
108
//31 = U+0031 : DIGIT ONE
109
//32 = U+0032 : DIGIT TWO
110
//33 = U+0033 : DIGIT THREE
111
//34 = U+0034 : DIGIT FOUR
112
//35 = U+0035 : DIGIT FIVE
113
//36 = U+0036 : DIGIT SIX
114
//37 = U+0037 : DIGIT SEVEN
115
//38 = U+0038 : DIGIT EIGHT
116
//39 = U+0039 : DIGIT NINE
117
//3A = U+003A : COLON
118
//3B = U+003B : SEMICOLON
119
//3C = U+003C : LESS-THAN SIGN
120
//3D = U+003D : EQUALS SIGN
121
//3E = U+003E : GREATER-THAN SIGN
122
//3F = U+003F : QUESTION MARK
123
//40 = U+0040 : COMMERCIAL AT
124
//41 = U+0041 : LATIN CAPITAL LETTER A
125
//42 = U+0042 : LATIN CAPITAL LETTER B
126
//43 = U+0043 : LATIN CAPITAL LETTER C
127
//44 = U+0044 : LATIN CAPITAL LETTER D
128
//45 = U+0045 : LATIN CAPITAL LETTER E
129
//46 = U+0046 : LATIN CAPITAL LETTER F
130
//47 = U+0047 : LATIN CAPITAL LETTER G
131
//48 = U+0048 : LATIN CAPITAL LETTER H
132
//49 = U+0049 : LATIN CAPITAL LETTER I
133
//4A = U+004A : LATIN CAPITAL LETTER J
134
//4B = U+004B : LATIN CAPITAL LETTER K
135
//4C = U+004C : LATIN CAPITAL LETTER L
136
//4D = U+004D : LATIN CAPITAL LETTER M
137
//4E = U+004E : LATIN CAPITAL LETTER N
138
//4F = U+004F : LATIN CAPITAL LETTER O
139
//50 = U+0050 : LATIN CAPITAL LETTER P
140
//51 = U+0051 : LATIN CAPITAL LETTER Q
141
//52 = U+0052 : LATIN CAPITAL LETTER R
142
//53 = U+0053 : LATIN CAPITAL LETTER S
143
//54 = U+0054 : LATIN CAPITAL LETTER T
144
//55 = U+0055 : LATIN CAPITAL LETTER U
145
//56 = U+0056 : LATIN CAPITAL LETTER V
146
//57 = U+0057 : LATIN CAPITAL LETTER W
147
//58 = U+0058 : LATIN CAPITAL LETTER X
148
//59 = U+0059 : LATIN CAPITAL LETTER Y
149
//5A = U+005A : LATIN CAPITAL LETTER Z
150
//5B = U+005B : LEFT SQUARE BRACKET
151
//5C = U+005C : REVERSE SOLIDUS
152
//5D = U+005D : RIGHT SQUARE BRACKET
153
//5E = U+005E : CIRCUMFLEX ACCENT
154
//5F = U+005F : LOW LINE
155
//60 = U+0060 : GRAVE ACCENT
156
//61 = U+0061 : LATIN SMALL LETTER A
157
//62 = U+0062 : LATIN SMALL LETTER B
158
//63 = U+0063 : LATIN SMALL LETTER C
159
//64 = U+0064 : LATIN SMALL LETTER D
160
//65 = U+0065 : LATIN SMALL LETTER E
161
//66 = U+0066 : LATIN SMALL LETTER F
162
//67 = U+0067 : LATIN SMALL LETTER G
163
//68 = U+0068 : LATIN SMALL LETTER H
164
//69 = U+0069 : LATIN SMALL LETTER I
165
//6A = U+006A : LATIN SMALL LETTER J
166
//6B = U+006B : LATIN SMALL LETTER K
167
//6C = U+006C : LATIN SMALL LETTER L
168
//6D = U+006D : LATIN SMALL LETTER M
169
//6E = U+006E : LATIN SMALL LETTER N
170
//6F = U+006F : LATIN SMALL LETTER O
171
//70 = U+0070 : LATIN SMALL LETTER P
172
//71 = U+0071 : LATIN SMALL LETTER Q
173
//72 = U+0072 : LATIN SMALL LETTER R
174
//73 = U+0073 : LATIN SMALL LETTER S
175
//74 = U+0074 : LATIN SMALL LETTER T
176
//75 = U+0075 : LATIN SMALL LETTER U
177
//76 = U+0076 : LATIN SMALL LETTER V
178
//77 = U+0077 : LATIN SMALL LETTER W
179
//78 = U+0078 : LATIN SMALL LETTER X
180
//79 = U+0079 : LATIN SMALL LETTER Y
181
//7A = U+007A : LATIN SMALL LETTER Z
182
//7B = U+007B : LEFT CURLY BRACKET
183
//7C = U+007C : VERTICAL LINE
184
//7D = U+007D : RIGHT CURLY BRACKET
185
//7E = U+007E : TILDE
186
//7F = U+007F : DELETE
187
//80 = U+20AC : EURO SIGN
188
//82 = U+201A : SINGLE LOW-9 QUOTATION MARK
189
//83 = U+0192 : LATIN SMALL LETTER F WITH HOOK
190
//84 = U+201E : DOUBLE LOW-9 QUOTATION MARK
191
//85 = U+2026 : HORIZONTAL ELLIPSIS
192
//86 = U+2020 : DAGGER
193
//87 = U+2021 : DOUBLE DAGGER
194
//88 = U+02C6 : MODIFIER LETTER CIRCUMFLEX ACCENT
195
//89 = U+2030 : PER MILLE SIGN
196
//8A = U+0160 : LATIN CAPITAL LETTER S WITH CARON
197
//8B = U+2039 : SINGLE LEFT-POINTING ANGLE QUOTATION MARK
198
//8C = U+0152 : LATIN CAPITAL LIGATURE OE
199
//8E = U+017D : LATIN CAPITAL LETTER Z WITH CARON
200
//91 = U+2018 : LEFT SINGLE QUOTATION MARK
201
//92 = U+2019 : RIGHT SINGLE QUOTATION MARK
202
//93 = U+201C : LEFT DOUBLE QUOTATION MARK
203
//94 = U+201D : RIGHT DOUBLE QUOTATION MARK
204
//95 = U+2022 : BULLET
205
//96 = U+2013 : EN DASH
206
//97 = U+2014 : EM DASH
207
//98 = U+02DC : SMALL TILDE
208
//99 = U+2122 : TRADE MARK SIGN
209
//9A = U+0161 : LATIN SMALL LETTER S WITH CARON
210
//9B = U+203A : SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
211
//9C = U+0153 : LATIN SMALL LIGATURE OE
212
//9E = U+017E : LATIN SMALL LETTER Z WITH CARON
213
//9F = U+0178 : LATIN CAPITAL LETTER Y WITH DIAERESIS
214
//A0 = U+00A0 : NO-BREAK SPACE
215
//A1 = U+00A1 : INVERTED EXCLAMATION MARK
216
//A2 = U+00A2 : CENT SIGN
217
//A3 = U+00A3 : POUND SIGN
218
//A4 = U+00A4 : CURRENCY SIGN
219
//A5 = U+00A5 : YEN SIGN
220
//A6 = U+00A6 : BROKEN BAR
221
//A7 = U+00A7 : SECTION SIGN
222
//A8 = U+00A8 : DIAERESIS
223
//A9 = U+00A9 : COPYRIGHT SIGN
224
//AA = U+00AA : FEMININE ORDINAL INDICATOR
225
//AB = U+00AB : LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
226
//AC = U+00AC : NOT SIGN
227
//AD = U+00AD : SOFT HYPHEN
228
//AE = U+00AE : REGISTERED SIGN
229
//AF = U+00AF : MACRON
230
//B0 = U+00B0 : DEGREE SIGN
231
//B1 = U+00B1 : PLUS-MINUS SIGN
232
//B2 = U+00B2 : SUPERSCRIPT TWO
233
//B3 = U+00B3 : SUPERSCRIPT THREE
234
//B4 = U+00B4 : ACUTE ACCENT
235
//B5 = U+00B5 : MICRO SIGN
236
//B6 = U+00B6 : PILCROW SIGN
237
//B7 = U+00B7 : MIDDLE DOT
238
//B8 = U+00B8 : CEDILLA
239
//B9 = U+00B9 : SUPERSCRIPT ONE
240
//BA = U+00BA : MASCULINE ORDINAL INDICATOR
241
//BB = U+00BB : RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
242
//BC = U+00BC : VULGAR FRACTION ONE QUARTER
243
//BD = U+00BD : VULGAR FRACTION ONE HALF
244
//BE = U+00BE : VULGAR FRACTION THREE QUARTERS
245
//BF = U+00BF : INVERTED QUESTION MARK
246
//C0 = U+00C0 : LATIN CAPITAL LETTER A WITH GRAVE
247
//C1 = U+00C1 : LATIN CAPITAL LETTER A WITH ACUTE
248
//C2 = U+00C2 : LATIN CAPITAL LETTER A WITH CIRCUMFLEX
249
//C3 = U+00C3 : LATIN CAPITAL LETTER A WITH TILDE
250
//C4 = U+00C4 : LATIN CAPITAL LETTER A WITH DIAERESIS
251
//C5 = U+00C5 : LATIN CAPITAL LETTER A WITH RING ABOVE
252
//C6 = U+00C6 : LATIN CAPITAL LETTER AE
253
//C7 = U+00C7 : LATIN CAPITAL LETTER C WITH CEDILLA
254
//C8 = U+00C8 : LATIN CAPITAL LETTER E WITH GRAVE
255
//C9 = U+00C9 : LATIN CAPITAL LETTER E WITH ACUTE
256
//CA = U+00CA : LATIN CAPITAL LETTER E WITH CIRCUMFLEX
257
//CB = U+00CB : LATIN CAPITAL LETTER E WITH DIAERESIS
258
//CC = U+00CC : LATIN CAPITAL LETTER I WITH GRAVE
259
//CD = U+00CD : LATIN CAPITAL LETTER I WITH ACUTE
260
//CE = U+00CE : LATIN CAPITAL LETTER I WITH CIRCUMFLEX
261
//CF = U+00CF : LATIN CAPITAL LETTER I WITH DIAERESIS
262
//D0 = U+00D0 : LATIN CAPITAL LETTER ETH
263
//D1 = U+00D1 : LATIN CAPITAL LETTER N WITH TILDE
264
//D2 = U+00D2 : LATIN CAPITAL LETTER O WITH GRAVE
265
//D3 = U+00D3 : LATIN CAPITAL LETTER O WITH ACUTE
266
//D4 = U+00D4 : LATIN CAPITAL LETTER O WITH CIRCUMFLEX
267
//D5 = U+00D5 : LATIN CAPITAL LETTER O WITH TILDE
268
//D6 = U+00D6 : LATIN CAPITAL LETTER O WITH DIAERESIS
269
//D7 = U+00D7 : MULTIPLICATION SIGN
270
//D8 = U+00D8 : LATIN CAPITAL LETTER O WITH STROKE
271
//D9 = U+00D9 : LATIN CAPITAL LETTER U WITH GRAVE
272
//DA = U+00DA : LATIN CAPITAL LETTER U WITH ACUTE
273
//DB = U+00DB : LATIN CAPITAL LETTER U WITH CIRCUMFLEX
274
//DC = U+00DC : LATIN CAPITAL LETTER U WITH DIAERESIS
275
//DD = U+00DD : LATIN CAPITAL LETTER Y WITH ACUTE
276
//DE = U+00DE : LATIN CAPITAL LETTER THORN
277
//DF = U+00DF : LATIN SMALL LETTER SHARP S
278
//E0 = U+00E0 : LATIN SMALL LETTER A WITH GRAVE
279
//E1 = U+00E1 : LATIN SMALL LETTER A WITH ACUTE
280
//E2 = U+00E2 : LATIN SMALL LETTER A WITH CIRCUMFLEX
281
//E3 = U+00E3 : LATIN SMALL LETTER A WITH TILDE
282
//E4 = U+00E4 : LATIN SMALL LETTER A WITH DIAERESIS
283
//E5 = U+00E5 : LATIN SMALL LETTER A WITH RING ABOVE
284
//E6 = U+00E6 : LATIN SMALL LETTER AE
285
//E7 = U+00E7 : LATIN SMALL LETTER C WITH CEDILLA
286
//E8 = U+00E8 : LATIN SMALL LETTER E WITH GRAVE
287
//E9 = U+00E9 : LATIN SMALL LETTER E WITH ACUTE
288
//EA = U+00EA : LATIN SMALL LETTER E WITH CIRCUMFLEX
289
//EB = U+00EB : LATIN SMALL LETTER E WITH DIAERESIS
290
//EC = U+00EC : LATIN SMALL LETTER I WITH GRAVE
291
//ED = U+00ED : LATIN SMALL LETTER I WITH ACUTE
292
//EE = U+00EE : LATIN SMALL LETTER I WITH CIRCUMFLEX
293
//EF = U+00EF : LATIN SMALL LETTER I WITH DIAERESIS
294
//F0 = U+00F0 : LATIN SMALL LETTER ETH
295
//F1 = U+00F1 : LATIN SMALL LETTER N WITH TILDE
296
//F2 = U+00F2 : LATIN SMALL LETTER O WITH GRAVE
297
//F3 = U+00F3 : LATIN SMALL LETTER O WITH ACUTE
298
//F4 = U+00F4 : LATIN SMALL LETTER O WITH CIRCUMFLEX
299
//F5 = U+00F5 : LATIN SMALL LETTER O WITH TILDE
300
//F6 = U+00F6 : LATIN SMALL LETTER O WITH DIAERESIS
301
//F7 = U+00F7 : DIVISION SIGN
302
//F8 = U+00F8 : LATIN SMALL LETTER O WITH STROKE
303
//F9 = U+00F9 : LATIN SMALL LETTER U WITH GRAVE
304
//FA = U+00FA : LATIN SMALL LETTER U WITH ACUTE
305
//FB = U+00FB : LATIN SMALL LETTER U WITH CIRCUMFLEX
306
//FC = U+00FC : LATIN SMALL LETTER U WITH DIAERESIS
307
//FD = U+00FD : LATIN SMALL LETTER Y WITH ACUTE
308
//FE = U+00FE : LATIN SMALL LETTER THORN
309
//FF = U+00FF : LATIN SMALL LETTER Y WITH DIAERESIS
310

311
312 //
313
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
314
// you may not use this file except in compliance with the License. You may obtain a copy of the
315
// License at http://www.mozilla.org/MPL/
316
//
317
// Software distributed under the License is distributed on an "AS IS" basis,
318
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
319
// See the License for the specific language governing rights and limitations under the License.
320
//
321
// The Original Code is: all this file.
322
//
323
// The Initial Developer of the Original Code is Pontus Haglund
324
//
325
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
326
//
327
// Contributor(s): none.
328
//
329
Popular Tags