001: /*
002: * @(#)ByteToCharMS950.java 1.13 06/10/10
003: *
004: * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
005: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU General Public License version
009: * 2 only, as published by the Free Software Foundation.
010: *
011: * This program is distributed in the hope that it will be useful, but
012: * WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * General Public License version 2 for more details (a copy is
015: * included at /legal/license.txt).
016: *
017: * You should have received a copy of the GNU General Public License
018: * version 2 along with this work; if not, write to the Free Software
019: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA
021: *
022: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
023: * Clara, CA 95054 or visit www.sun.com if you need additional
024: * information or have any questions.
025: *
026: */
027:
028: package sun.io;
029:
030: /**
031: * Tables and data to convert MS950 to Unicode
032: *
033: * @author ConverterGenerator tool
034: * @version >= JDK1.1.6
035: */
036:
037: public class ByteToCharMS950 extends ByteToCharBig5 {
038: int _start, _end;
039:
040: public String getCharacterEncoding() {
041: return "MS950";
042: }
043:
044: public ByteToCharMS950() {
045: super ();
046: _start = 0x40;
047: _end = 0xFE;
048: }
049:
050: protected char getUnicode(int byte1, int byte2) {
051: int n = (_index1[byte1] & 0xf) * (_end - _start + 1)
052: + (byte2 - _start);
053: char unicode = _index2[_index1[byte1] >> 4].charAt(n);
054: if (unicode == '\u0000')
055: return (super .getUnicode(byte1, byte2));
056: else
057: return unicode;
058: }
059:
060: private final static String _innerIndex0 = "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
061: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
062: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
063: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
064: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
065: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
066: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
067: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
068: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
069: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
070: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
071: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
072: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
073: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
074: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
075: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
076: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
077: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
078: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
079: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
080: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
081: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
082: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
083: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
084: + "\u0000\u0000\u0000\u0000\u2027\u0000\u0000\u0000"
085: + "\u0000\u0000\u0000\u0000\u0000\uFE51\u0000\u0000"
086: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
087: + "\u0000\u2574\u0000\u0000\u0000\u0000\u0000\u0000"
088: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
089: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
090: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
091: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
092: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
093: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
094: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
095: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
096: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
097: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
098: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
099: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
100: + "\u0000\u00AF\uFFE3\u0000\u02CD\u0000\u0000\u0000"
101: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
102: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
103: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
104: + "\u0000\u0000\uFF5E\u0000\u0000\u0000\u0000\u0000"
105: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
106: + "\u0000\u2295\u2299\u0000\u0000\u0000\u0000\u0000"
107: + "\u0000\u0000\u0000\u0000\u0000\uFF0F\uFF3C\u2215"
108: + "\uFE68\u0000\uFFE5\u0000\uFFE0\uFFE1\u0000\u0000"
109: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
110: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
111: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
112: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
113: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
114: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
115: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
116: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
117: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
118: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
119: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
120: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
121: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
122: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
123: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
124: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
125: + "\u0000\u0000\u5341\u0000\u5345\u0000\u0000\u0000"
126: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
127: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
128: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
129: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
130: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
131: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
132: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
133: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
134: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
135: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
136: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
137: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
138: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
139: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
140: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
141: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
142: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
143: + "\u0000\u0000\u0000\u0000\u0000\u0000\uFFFD\uFFFD"
144: + "\uF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uFFFD\uFFFD\uFFFD\u0000\u0000\u0000\u0000\u0000"
164: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
165: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
166: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
167: + "\u0000\u0000\u0000\u0000\u0000\uFFFD\uFFFD\uFFFD"
168: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
169: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
170: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
171: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
172: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
173: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
174: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
175: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
176: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
177: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
178: + "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD"
179: + "\uFFFD\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
180: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
181: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
182: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
183: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
184: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
185: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
186: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
187: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
188: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
189: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
190: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
191: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
192: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
193: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
194: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
195: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
196: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
197: + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
198: + "\u0000\u7881\u92B9\u88CF\u58BB\u6052\u7CA7\u5AFA"
199: + "\u2554\u2566\u2557\u2560\u256C\u2563\u255A\u2569"
200: + "\u255D\u2552\u2564\u2555\u255E\u256A\u2561\u2558"
201: + "\u2567\u255B\u2553\u2565\u2556\u255F\u256B\u2562"
202: + "\u2559\u2568\u255C\u2551\u2550\u256D\u256E\u2570"
203: + "\u256F\u2593";
204: private final static short _index1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0,
205: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
206: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
207: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
208: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
209: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
210: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
211: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
212: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0,
213: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
214: 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
215: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
216: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
217: 5, 0, 0, 0, 0, 0, 0 };
218: String _index2[] = { _innerIndex0 };
219: }
|