Receive notification of character data.

@param characters The string of characters to process.

@throws org.xml.sax.SAXException

@see ExtendedContentHandler#characters(String)
979871
public void characters(String characters) throws SAXException
    {
        final int len = characters.length();
        if (len > m_charsBuff.length)
        {
           m_charsBuff = new char[len*2 + 1];             
        }
        characters.getChars(0,len, m_charsBuff, 0);   
        characters(m_charsBuff, 0, len);
    }
993725
public void writeCharacters(final char[] ch, final int start, final int length) throws SAXException {
        if (elementStack.isEmpty()) {
            throw new IllegalStateException("Current state does not allow Character writing");
        }
        processStartElement();
        transformer.characters(ch, start, length);
    }
1359250
public void characters(char[] ch, int start, int length)
       throws org.xml.sax.SAXException
  {
    // Actually creating the text node is handled by
    // processAccumulatedText(); here we just accumulate the
    // characters into the buffer.
    m_char.append(ch,start,length);
  }
330126
public void characters(char ch[], int start, int length) throws SAXException
   {
      try
      {
         importer.characters(ch, start, length);
      }
      catch (RepositoryException e)
      {
         throw new SAXException(e);
      }

   }
671305
void printSaxException(String message, SAXException e) {
        System.err.println();
        System.err.println("*** SAX Exception -- " + message);
        System.err.println("      SystemId = \"" +
                documentLocator.getSystemId() + "\"");
        e.printStackTrace(System.err);
    }
1043238
private void parseCharRef(boolean doFlush) throws SAXException, IOException {
        int value = 0;
        char c;

        if (tryRead('x')) {
            loop1: while (true) {
                c = readCh();
                if (c == ';') {
                    break loop1;
                } else {
                    int n = Character.digit(c, 16);
                    if (n == -1) {
                        fatal("illegal character in character reference", c,
                                null);
                        break loop1;
                    }
                    value *= 16;
                    value += n;
                }
            }
        } else {
            loop2: while (true) {
                c = readCh();
                if (c == ';') {
                    break loop2;
                } else {
                    int n = Character.digit(c, 10);
                    if (n == -1) {
                        fatal("illegal character in character reference", c,
                                null);
                        break loop2;
                    }
                    value *= 10;
                    value += c - '0';
                }
            }
        }

        // check for character refs being legal XML
        if (((value < 0x0020) && !((value == '\n') || (value == '\t') || (value == '\r')))
                || ((value >= 0xD800) && (value <= 0xDFFF))
                || (value == 0xFFFE)
                || (value == 0xFFFF) || (value > 0x0010ffff)) {
            fatal("illegal XML character reference U+"
                    + Integer.toHexString(value));
        } else if ((value >= 0x007F) && (value <= 0x009F)) // 2006-11-13 hsivonen
        {
            handler.warn("Character reference expands to a control character: U+00"
                    + Integer.toHexString(value) + ".");
        }
        if (isPrivateUse(value)) {
            warnAboutPrivateUseChar();
        }

        // Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz
        // (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz:
        if (value <= 0x0000ffff) {
            // no surrogates needed
            dataBufferAppend((char) value);
        } else if (value <= 0x0010ffff) {
            value -= 0x10000;
            // > 16 bits, surrogate needed
            dataBufferAppend((char) (0xd800 | (value >> 10)));
            dataBufferAppend((char) (0xdc00 | (value & 0x0003ff)));
        } else {
            // too big for surrogate
            fatal("character reference " + value + " is too large for UTF-16",
                    Integer.valueOf(value).toString(), null);
        }
        if (doFlush) {
            dataBufferFlush();
        }
    }
1338118
def characters(self, chars):
        
        self._finish_pending_start_element()
        if not is_valid_cdata_str(chars):
            raise ValueError("control characters are not allowed in "
                             "well-formed XML")
        self._write(xml.sax.saxutils.escape(
            chars,
            self._additional_escapes,
        ).encode("utf-8"))
867205
@Override
    public final void ignorableWhitespace(char[] ch, int start, int length)
            throws SAXException {
        characters(ch, start, length);
    }
832006
public static Characters allBut(char... chars) {
        return chars.length == 0 ? Characters.ALL : new Characters(true, chars.clone());
    }
530153
public void writeString(String str, String charset) throws IOException {

		if (str == null) {
			writeInt(0);
		} else {
			byte[] tmp;

			if (ByteArrayReader.encode)
				tmp = str.getBytes(charset);
			else
				tmp = str.getBytes();

			writeInt(tmp.length);
			write(tmp);
		}
	}
685114
public void characters(char[] ch, int start, int length) {

        if (ignore)
            return;

        String content = new String(ch, start, length);
        // System.err.println("'" + content + "'");

        if (content.trim().length() == 0 && content.indexOf(' ') < 0) {
            return;
        }

        StringBuffer buf = new StringBuffer();
        int len = content.length();
        char character;
        boolean newline = false;
        for (int i = 0; i < len; i++) {
            switch (character = content.charAt(i)) {
            case ' ':
                if (!newline) {
                    buf.append(character);
                }
                break;
            case '\n':
                if (i > 0) {
                    newline = true;
                    buf.append(' ');
                }
                break;
            case '\r':
                break;
            case '\t':
                break;
            default:
                newline = false;
                buf.append(character);
            }
        }
        if (currentChunk == null) {
        	if (bf == null) {
        		currentChunk = new Chunk(buf.toString());
        	}
        	else {
        		currentChunk = new Chunk(buf.toString(), new Font(this.bf));
        	}
        } else {
            currentChunk.append(buf.toString());
        }
    }
1256882
@Override
    public void setAsText(final String text) {
        if (BeanUtils.isNull(text)){
            setValue(null);
            return;
        }
        String[] tokens = super.tokenize(text);
        char[] theValue = new char[tokens.length];

        for (int index = 0; index < tokens.length; index++) {
            if (tokens[index].length() != 1)
                throw new IllegalArgumentException("Too many (" + tokens[index].length() + ") characters: '" + tokens[index]
                        + "'");
            theValue[index] = tokens[index].charAt(0);
        }
        setValue(theValue);
    }
393092
@Override
    public void characters(char ch[], int start, int length) {
        if (debug) logger.debug(new String(ch, start, length));
        conv.characterData(xpath, ch, start, length);
    }
800218
public void print(char c) throws IOException
    {
        if(this._listener!= null &&  !checkIfCalledFromWLonError()){
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())    
                Tr.debug(tc, "non blocking print char , WriteListener enabled: " + this._listener);
            this.print_NonBlocking(Character.toString(c));
        }
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())    
                Tr.debug(tc, "print char");
            super.print(c);
        }    
    }
1032136
@Override
    public void characters( char[] ch, int start, int length )
        throws SAXException
    {
        charBuffer.append( ch, start, length );
        charLineNumber = locator.getLineNumber();
    }
1319130
public static Characters of(char... chars) {
        return chars.length == 0 ? Characters.NONE : new Characters(false, chars.clone());
    }
615347
public void setCharset(String charset) {
	if (StringUtil.isEmpty(charset)) return;
	this.charset = CharsetUtil.toCharSet(charset.trim());
    }