5163N/A * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. 177N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 177N/A * This code is free software; you can redistribute it and/or modify it 177N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 177N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 177N/A * This code is distributed in the hope that it will be useful, but WITHOUT 177N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 177N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 177N/A * version 2 for more details (a copy is included in the LICENSE file that 177N/A * accompanied this code). 177N/A * You should have received a copy of the GNU General Public License version 177N/A * 2 along with this work; if not, write to the Free Software Foundation, 177N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 177N/A * JIS_X_0213 does not define single-byte character itself, the 177N/A * JIS_X_0201 entries are added in for sjis implementation. 177N/A * (2)Double-Byte SJIS <-> BMP Unicode 177N/A * ex: 0x8140 U+3000 # IDEOGRAPHIC SPACE 177N/A * (3)Double-Byte SJIS <-> Supplementary 177N/A * ex: 0xFCF0 U+2A61A # <cjk> [2000] [Unicode3.1] 177N/A * (4)Double-Byte SJIS <-> Composite 177N/A * ex: 0x83F6 U+31F7+309A # [2000] 177N/A * (5)"Windows-only" special mapping entries 177N/A * are handled by MS932_0213. 177N/A // Unlike surrogate pair, the base character of a base+cc composite 177N/A // itself is a legal codepoint in 0213, if we simply return UNDERFLOW 177N/A // when a base candidate is the last input char in the CharBuffer, like 177N/A // what we do for the surrogte pair, encoding will fail if this base 177N/A // character is indeed the last character of the input char sequence. 177N/A // Keep this base candidate in "leftoverBase" so we can flush it out 177N/A // at the end of the encoding circle.