protected void extract(int c, WPInputStream in, StringBuilder out, XHTMLContentHandler xhtml)
            throws IOException, SAXException {

        // 0-31: control characters
        if (c == 10) {
            endParagraph(out, xhtml);// hard return ("Enter")
        } else if (c == 11) {
            out.append(' ');      // soft page break
        } else if (c == 12) {
            endParagraph(out, xhtml);// hard page break
        } else if (c == 13) {
            out.append(' ');      // soft return (line wrap)

            // 32-126: ASCII characters
        } else if (c >= 32 && c <= 126) {
            out.append((char) c); // ASCII character

            // 128-191: single-byte functions
        } else if (c == 140) {
            endParagraph(out, xhtml);// combination hard return/soft page (WP5.1)
        } else if (c >= 144 && c <= 149) {
            out.append(' ');      // deletable/invisible soft return/page
        } else if (c == 153) {
            endParagraph(out, xhtml);// Dormant Hard return (WP5.1)
        } else if (c == 160) {
            out.append('\u00A0'); // Hard space
        } else if (c >= 169 && c <= 171) {
            out.append('-');      // Hard hyphen

            // 192-207: fixed-length multi-byte function
        } else if (c == 192) {
            // extended char
            int charval = in.readWP();
            int charset = in.readWP();
            in.readWP(); // closing character
            WP5Charsets.append(out, charset, charval);
        } else if (c >= 193 && c <= 207) {
            // removing 1 from function length since first char already read
            in.skipWPByte(FIXED_LENGTH_FUNCTION_SIZES.get(c) - 1);

            // 208-255: variable-length multi-byte function
        } else if (c >= 208 && c <= 255) {
            // Variable-Length Multi-Byte Functions
            in.readWP(); // subgroup (the function code)
            int functionSize = in.readWPShort();
            for (int i = 0; i < functionSize; i++) {
                in.readWP();
            }
            //TODO Are there functions containing data? Like footnotes?
        }
    }
Extracts WordPerfect Document Area text from a WordPerfect document
version 5.x.

@author Pascal Essiembre
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-miscoffice-module/src/main/java/org/apache/tika/parser/wordperfect/WP5DocumentAreaExtractor.java