*/
    private void setBaseEncoding(String baseencoding) {
        if (baseencoding == null) {
            encodingName = "none";
            return;
        } else if (baseencoding.equals("StandardEncoding")) {
            encodingName = "StandardEncoding";
            encoding = Encoding.getStandard();
        } else if (baseencoding.equals("MacRomanEncoding")) {
            encodingName = "MacRomanEncoding";
            encoding = Encoding.getMacRoman();
        } else if (baseencoding.equals("WinAnsiEncoding")) {
            encodingName = "WinAnsiEncoding";
            encoding = Encoding.getWinAnsi();
        } else if (baseencoding.equals("PDFDocEncoding")) {
            encodingName = "PDFDocEncoding";
            encoding = Encoding.getPDFDoc();
        }
        // initiate encoding cMap.
        if (encoding != null) {
            for (char i = 0; i < 256; i++) {
                cMap[i] = encoding.get(i);
            }
        }
    }