KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.icl.saxon.charcode;
2
3 /**
4 * This class defines properties of the Unicode character set
5 */

6
7 public final class UnicodeCharacterSet implements CharacterSet {
8     
9     private static UnicodeCharacterSet theInstance = new UnicodeCharacterSet();
10     
11     public static UnicodeCharacterSet getInstance() {
12         return theInstance;
13     }
14
15     public boolean inCharset(int c) {
16         return true;
17         
18         // old code: return true unless the character is one half of a surrogate pair (D800 to DFFF)
19
// this forces such characters to be output as numeric character references, but doesn't work
20
// for method="text"
21
// return (c<55296 || c>57343);
22

23     }
24
25 }
26
27 //
28
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
29
// you may not use this file except in compliance with the License. You may obtain a copy of the
30
// License at http://www.mozilla.org/MPL/
31
//
32
// Software distributed under the License is distributed on an "AS IS" basis,
33
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
34
// See the License for the specific language governing rights and limitations under the License.
35
//
36
// The Original Code is: all this file.
37
//
38
// The Initial Developer of the Original Code is
39
// Aleksei Makarov [makarov@iitam.omsk.net.ru]
40
//
41
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
42
//
43
// Contributor(s): none.
44
//
45
Popular Tags