private void set_cdt(CodeTracker cdt, int g0_or_g1, char[] data, int addnlOffset, boolean multibyte)
    {
        if (data[cdt.offset + addnlOffset] == '!' && data[cdt.offset + addnlOffset + 1] == 'E') 
        {
            addnlOffset++;
        }
        else if (data[cdt.offset + addnlOffset] == ' ') 
        {
            if (errorList != null)
            {
                errorList.addError(ErrorHandler.ERROR_TYPO, "Extraneous space character found within MARC8 character set escape sequence. Skipping over space.");
            }           
            else
            {
                throw new MarcException("Extraneous space character found within MARC8 character set escape sequence");
            }
            addnlOffset++;
        }
        else if ("(,)-$!".indexOf(data[cdt.offset + addnlOffset]) != -1) 
        {
            if (errorList != null)
            {
                errorList.addError(ErrorHandler.MINOR_ERROR, "Extraneaous intermediate character found following escape character. Discarding intermediate character.");
            }           
            else
            {
                throw new MarcException("Extraneaous intermediate character found following escape character.");
            }
            addnlOffset++;
        }
        if ("34BE1NQS2".indexOf(data[cdt.offset + addnlOffset]) == -1)
        {
            cdt.offset += 1;
            cdt.multibyte = false;
            if (errorList != null)
            {
                errorList.addError(ErrorHandler.MINOR_ERROR, "Unknown character set code found following escape character. Discarding escape character.");
            }           
            else
            {
                throw new MarcException("Unknown character set code found following escape character.");
            }
        }
        else  // All is well, proceed normally
        {
            if (g0_or_g1 == 0) cdt.g0 = data[cdt.offset + addnlOffset];
            else               cdt.g1 = data[cdt.offset + addnlOffset];
            cdt.offset += 1 + addnlOffset;
            cdt.multibyte = multibyte;
        }
    }