40     bool ampersand = 
false;
 
   47     for (text = 
""; *from; from++) {
 
   57         else if (*from == 
'&') {
 
   60             memset(token, 0, 2048);
 
   64         if (*from == 
';' && ampersand) {
 
   67             if (!strncmp(
"nbsp", token, 4)) text += 
' ';
 
   68             else if (!strncmp(
"quot", token, 4)) text += 
'"';
 
   69             else if (!strncmp(
"amp", token, 3)) text += 
'&';
 
   70             else if (!strncmp(
"lt", token, 2)) text += 
'<';
 
   71             else if (!strncmp(
"gt", token, 2)) text += 
'>';
 
   72             else if (!strncmp(
"brvbar", token, 6)) text += 
'¦';
 
   73             else if (!strncmp(
"sect", token, 4)) text += 
'§';
 
   74             else if (!strncmp(
"copy", token, 4)) text += 
'©';
 
   75             else if (!strncmp(
"laquo", token, 5)) text += 
'«';
 
   76             else if (!strncmp(
"reg", token, 3)) text += 
'®';
 
   77             else if (!strncmp(
"acute", token, 5)) text += 
'´';
 
   78             else if (!strncmp(
"para", token, 4)) text += 
'¶';
 
   79             else if (!strncmp(
"raquo", token, 5)) text += 
'»';
 
   81             else if (!strncmp(
"Aacute", token, 6)) text += 
'Á';
 
   82             else if (!strncmp(
"Agrave", token, 6)) text += 
'À';
 
   83             else if (!strncmp(
"Acirc", token, 5)) text += 
'Â';
 
   84             else if (!strncmp(
"Auml", token, 4)) text += 
'Ä';
 
   85             else if (!strncmp(
"Atilde", token, 6)) text += 
'Ã';
 
   86             else if (!strncmp(
"Aring", token, 5)) text += 
'Å';
 
   87             else if (!strncmp(
"aacute", token, 6)) text += 
'á' 
            else if (!strncmp("agrave", token, 6)) text += 'à';
            else if (!strncmp("acirc", token, 5)) text += 'â';
            else if (!strncmp("auml", token, 4)) text += 'ä';
            else if (!strncmp("atilde", token, 6)) text += 'ã';
            else if (!strncmp("aring", token, 5)) text += 'å';
            else if (!strncmp("Eacute", token, 6)) text += 'É';
            else if (!strncmp("Egrave", token, 6)) text += 'È';
            else if (!strncmp("Ecirc", token, 5)) text += 'Ê';
            else if (!strncmp("Euml", token, 4)) text += 'Ë';
            else if (!strncmp("eacute", token, 6)) text += 'é';
            else if (!strncmp("egrave", token, 6)) text += 'è';
            else if (!strncmp("ecirc", token, 5)) text += 'ê';
            else if (!strncmp("euml", token, 4)) text += 'ë';
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
   88             else if (!strncmp(
"agrave", token, 6)) text += 
'à' 
            else if (!strncmp("acirc", token, 5)) text += 'â';
            else if (!strncmp("auml", token, 4)) text += 'ä';
            else if (!strncmp("atilde", token, 6)) text += 'ã';
            else if (!strncmp("aring", token, 5)) text += 'å';
            else if (!strncmp("Eacute", token, 6)) text += 'É';
            else if (!strncmp("Egrave", token, 6)) text += 'È';
            else if (!strncmp("Ecirc", token, 5)) text += 'Ê';
            else if (!strncmp("Euml", token, 4)) text += 'Ë';
            else if (!strncmp("eacute", token, 6)) text += 'é';
            else if (!strncmp("egrave", token, 6)) text += 'è';
            else if (!strncmp("ecirc", token, 5)) text += 'ê';
            else if (!strncmp("euml", token, 4)) text += 'ë';
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
   89             else if (!strncmp(
"acirc", token, 5)) text += 
'â' 
            else if (!strncmp("auml", token, 4)) text += 'ä';
            else if (!strncmp("atilde", token, 6)) text += 'ã';
            else if (!strncmp("aring", token, 5)) text += 'å';
            else if (!strncmp("Eacute", token, 6)) text += 'É';
            else if (!strncmp("Egrave", token, 6)) text += 'È';
            else if (!strncmp("Ecirc", token, 5)) text += 'Ê';
            else if (!strncmp("Euml", token, 4)) text += 'Ë';
            else if (!strncmp("eacute", token, 6)) text += 'é';
            else if (!strncmp("egrave", token, 6)) text += 'è';
            else if (!strncmp("ecirc", token, 5)) text += 'ê';
            else if (!strncmp("euml", token, 4)) text += 'ë';
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
   90             else if (!strncmp(
"auml", token, 4)) text += 
'ä' 
            else if (!strncmp("atilde", token, 6)) text += 'ã';
            else if (!strncmp("aring", token, 5)) text += 'å';
            else if (!strncmp("Eacute", token, 6)) text += 'É';
            else if (!strncmp("Egrave", token, 6)) text += 'È';
            else if (!strncmp("Ecirc", token, 5)) text += 'Ê';
            else if (!strncmp("Euml", token, 4)) text += 'Ë';
            else if (!strncmp("eacute", token, 6)) text += 'é';
            else if (!strncmp("egrave", token, 6)) text += 'è';
            else if (!strncmp("ecirc", token, 5)) text += 'ê';
            else if (!strncmp("euml", token, 4)) text += 'ë';
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
   91             else if (!strncmp(
"atilde", token, 6)) text += 
'ã' 
            else if (!strncmp("aring", token, 5)) text += 'å';
            else if (!strncmp("Eacute", token, 6)) text += 'É';
            else if (!strncmp("Egrave", token, 6)) text += 'È';
            else if (!strncmp("Ecirc", token, 5)) text += 'Ê';
            else if (!strncmp("Euml", token, 4)) text += 'Ë';
            else if (!strncmp("eacute", token, 6)) text += 'é';
            else if (!strncmp("egrave", token, 6)) text += 'è';
            else if (!strncmp("ecirc", token, 5)) text += 'ê';
            else if (!strncmp("euml", token, 4)) text += 'ë';
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
   92             else if (!strncmp(
"aring", token, 5)) text += 
'å' 
            else if (!strncmp("Eacute", token, 6)) text += 'É';
            else if (!strncmp("Egrave", token, 6)) text += 'È';
            else if (!strncmp("Ecirc", token, 5)) text += 'Ê';
            else if (!strncmp("Euml", token, 4)) text += 'Ë';
            else if (!strncmp("eacute", token, 6)) text += 'é';
            else if (!strncmp("egrave", token, 6)) text += 'è';
            else if (!strncmp("ecirc", token, 5)) text += 'ê';
            else if (!strncmp("euml", token, 4)) text += 'ë';
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
   93             else if (!strncmp(
"Eacute", token, 6)) text += 
'É';
 
   94             else if (!strncmp(
"Egrave", token, 6)) text += 
'È';
 
   95             else if (!strncmp(
"Ecirc", token, 5)) text += 
'Ê';
 
   96             else if (!strncmp(
"Euml", token, 4)) text += 
'Ë';
 
   97             else if (!strncmp(
"eacute", token, 6)) text += 
'é' 
            else if (!strncmp("egrave", token, 6)) text += 'è';
            else if (!strncmp("ecirc", token, 5)) text += 'ê';
            else if (!strncmp("euml", token, 4)) text += 'ë';
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
   98             else if (!strncmp(
"egrave", token, 6)) text += 
'è' 
            else if (!strncmp("ecirc", token, 5)) text += 'ê';
            else if (!strncmp("euml", token, 4)) text += 'ë';
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
   99             else if (!strncmp(
"ecirc", token, 5)) text += 
'ê' 
            else if (!strncmp("euml", token, 4)) text += 'ë';
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  100             else if (!strncmp(
"euml", token, 4)) text += 
'ë' 
            else if (!strncmp("Iacute", token, 6)) text += 'Í';
            else if (!strncmp("Igrave", token, 6)) text += 'Ì';
            else if (!strncmp("Icirc", token, 5)) text += 'Î';
            else if (!strncmp("Iuml", token, 4)) text += 'Ï';
            else if (!strncmp("iacute", token, 6)) text += 'í';
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  101             else if (!strncmp(
"Iacute", token, 6)) text += 
'Í';
 
  102             else if (!strncmp(
"Igrave", token, 6)) text += 
'Ì';
 
  103             else if (!strncmp(
"Icirc", token, 5)) text += 
'Î';
 
  104             else if (!strncmp(
"Iuml", token, 4)) text += 
'Ï';
 
  105             else if (!strncmp(
"iacute", token, 6)) text += 
'í' 
            else if (!strncmp("igrave", token, 6)) text += 'ì';
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  106             else if (!strncmp(
"igrave", token, 6)) text += 
'ì' 
            else if (!strncmp("icirc", token, 5)) text += 'î';
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  107             else if (!strncmp(
"icirc", token, 5)) text += 
'î' 
            else if (!strncmp("iuml", token, 4)) text += 'ï';
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  108             else if (!strncmp(
"iuml", token, 4)) text += 
'ï' 
            else if (!strncmp("Oacute", token, 6)) text += 'Ó';
            else if (!strncmp("Ograve", token, 6)) text += 'Ò';
            else if (!strncmp("Ocirc", token, 5)) text += 'Ô';
            else if (!strncmp("Ouml", token, 4)) text += 'Ö';
            else if (!strncmp("Otilde", token, 6)) text += 'Õ';
            else if (!strncmp("oacute", token, 6)) text += 'ó';
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  109             else if (!strncmp(
"Oacute", token, 6)) text += 
'Ó';
 
  110             else if (!strncmp(
"Ograve", token, 6)) text += 
'Ò';
 
  111             else if (!strncmp(
"Ocirc", token, 5)) text += 
'Ô';
 
  112             else if (!strncmp(
"Ouml", token, 4)) text += 
'Ö';
 
  113             else if (!strncmp(
"Otilde", token, 6)) text += 
'Õ';
 
  114             else if (!strncmp(
"oacute", token, 6)) text += 
'ó' 
           else if (!strncmp("ograve", token, 6)) text += 'ò';
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  115             else if (!strncmp(
"ograve", token, 6)) text += 
'ò' 
           else if (!strncmp("ocirc", token, 5)) text += 'ô';
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  116             else if (!strncmp(
"ocirc", token, 5)) text += 
'ô' 
            else if (!strncmp("ouml", token, 4)) text += 'ö';
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  117             else if (!strncmp(
"ouml", token, 4)) text += 
'ö' 
         else if (!strncmp("otilde", token, 6)) text += 'õ';
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  118             else if (!strncmp(
"otilde", token, 6)) text += 
'õ' 
           else if (!strncmp("Uacute", token, 6)) text += 'Ú';
            else if (!strncmp("Ugrave", token, 6)) text += 'Ù';
            else if (!strncmp("Ucirc", token, 5)) text += 'Û';
            else if (!strncmp("Uuml", token, 4)) text += 'Ü';
            else if (!strncmp("uacute", token, 6)) text += 'ú';
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  119             else if (!strncmp(
"Uacute", token, 6)) text += 
'Ú';
 
  120             else if (!strncmp(
"Ugrave", token, 6)) text += 
'Ù';
 
  121             else if (!strncmp(
"Ucirc", token, 5)) text += 
'Û';
 
  122             else if (!strncmp(
"Uuml", token, 4)) text += 
'Ü';
 
  123             else if (!strncmp(
"uacute", token, 6)) text += 
'ú' 
           else if (!strncmp("ugrave", token, 6)) text += 'ù';
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  124             else if (!strncmp(
"ugrave", token, 6)) text += 
'ù' 
           else if (!strncmp("ucirc", token, 5)) text += 'û';
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  125             else if (!strncmp(
"ucirc", token, 5)) text += 
'û' 
            else if (!strncmp("uuml", token, 4)) text += 'ü';
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  126             else if (!strncmp(
"uuml", token, 4)) text += 
'ü' 
         else if (!strncmp("Yacute", token, 6)) text += 'Ý';
            else if (!strncmp("yacute", token, 6)) text += 'ý';
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  127             else if (!strncmp(
"Yacute", token, 6)) text += 
'Ý';
 
  128             else if (!strncmp(
"yacute", token, 6)) text += 
'ý' 
           else if (!strncmp("yuml", token, 4)) text += 'ÿ';
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  129             else if (!strncmp(
"yuml", token, 4)) text += 
'ÿ' 
         
            else if (!strncmp("deg", token, 3)) text += '°';
            else if (!strncmp("plusmn", token, 6)) text += '±';
            else if (!strncmp("sup2", token, 4)) text += '²';
            else if (!strncmp("sup3", token, 4)) text += '³';
            else if (!strncmp("sup1", token, 4)) text += '¹';
            else if (!strncmp("nbsp", token, 4)) text += 'º';
            else if (!strncmp("pound", token, 5)) text += '£';
            else if (!strncmp("cent", token, 4)) text += '¢';
            else if (!strncmp("frac14", token, 6)) text += '¼';
            else if (!strncmp("frac12", token, 6)) text += '½';
            else if (!strncmp("frac34", token, 6)) text += '¾';
            else if (!strncmp("iquest", token, 6)) text += '¿';
            else if (!strncmp("iexcl", token, 5)) text += '¡';
            else if (!strncmp("ETH", token, 3)) text += 'Ð';
            else if (!strncmp("eth", token, 3)) text += 'ð';
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  131             else if (!strncmp(
"deg", token, 3)) text += 
'°';
 
  132             else if (!strncmp(
"plusmn", token, 6)) text += 
'±';
 
  133             else if (!strncmp(
"sup2", token, 4)) text += 
'²';
 
  134             else if (!strncmp(
"sup3", token, 4)) text += 
'³';
 
  135             else if (!strncmp(
"sup1", token, 4)) text += 
'¹';
 
  136             else if (!strncmp(
"nbsp", token, 4)) text += 
'º';
 
  137             else if (!strncmp(
"pound", token, 5)) text += 
'£';
 
  138             else if (!strncmp(
"cent", token, 4)) text += 
'¢';
 
  139             else if (!strncmp(
"frac14", token, 6)) text += 
'¼';
 
  140             else if (!strncmp(
"frac12", token, 6)) text += 
'½';
 
  141             else if (!strncmp(
"frac34", token, 6)) text += 
'¾';
 
  142             else if (!strncmp(
"iquest", token, 6)) text += 
'¿';
 
  143             else if (!strncmp(
"iexcl", token, 5)) text += 
'¡';
 
  144             else if (!strncmp(
"ETH", token, 3)) text += 
'Ð';
 
  145             else if (!strncmp(
"eth", token, 3)) text += 
'ð' 
          else if (!strncmp("THORN", token, 5)) text += 'Þ';
            else if (!strncmp("thorn", token, 5)) text += 'þ';
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  146             else if (!strncmp(
"THORN", token, 5)) text += 
'Þ';
 
  147             else if (!strncmp(
"thorn", token, 5)) text += 
'þ' 
            else if (!strncmp("AElig", token, 5)) text += 'Æ';
            else if (!strncmp("aelig", token, 5)) text += 'æ';
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  148             else if (!strncmp(
"AElig", token, 5)) text += 
'Æ';
 
  149             else if (!strncmp(
"aelig", token, 5)) text += 
'æ' 
            else if (!strncmp("Oslash", token, 6)) text += 'Ø';
            else if (!strncmp("curren", token, 6)) text += '¤';
            else if (!strncmp("Ccedil", token, 6)) text += 'Ç';
            else if (!strncmp("ccedil", token, 6)) text += 'ç';
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  150             else if (!strncmp(
"Oslash", token, 6)) text += 
'Ø';
 
  151             else if (!strncmp(
"curren", token, 6)) text += 
'¤';
 
  152             else if (!strncmp(
"Ccedil", token, 6)) text += 
'Ç';
 
  153             else if (!strncmp(
"ccedil", token, 6)) text += 
'ç' 
            else if (!strncmp("szlig", token, 5)) text += 'ß';
            else if (!strncmp("Ntilde", token, 6)) text += 'Ñ';
            else if (!strncmp("ntilde", token, 6)) text += 'ñ';
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  154             else if (!strncmp(
"szlig", token, 5)) text += 
'ß';
 
  155             else if (!strncmp(
"Ntilde", token, 6)) text += 
'Ñ';
 
  156             else if (!strncmp(
"ntilde", token, 6)) text += 
'ñ' 
           else if (!strncmp("yen", token, 3)) text += '¥';
            else if (!strncmp("not", token, 3)) text += '¬';
            else if (!strncmp("ordf", token, 4)) text += 'ª';
            else if (!strncmp("uml", token, 3)) text += '¨';
            else if (!strncmp("shy", token, 3)) text += '';
            else if (!strncmp("macr", token, 4)) text += '¯';
            else if (!strncmp("micro", token, 5)) text += "µ";
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
;
 
  157             else if (!strncmp(
"yen", token, 3)) text += 
'¥';
 
  158             else if (!strncmp(
"not", token, 3)) text += 
'¬';
 
  159             else if (!strncmp(
"ordf", token, 4)) text += 
'ª';
 
  160             else if (!strncmp(
"uml", token, 3)) text += 
'¨';
 
  161             else if (!strncmp(
"shy", token, 3)) text += 
'';
 
  162             else if (!strncmp(
"macr", token, 4)) text += 
'¯';
 
  163             else if (!strncmp(
"micro", token, 5)) text += 
"µ ;
            else if (!strncmp("middot", token, 6)) text +="·";
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
";
 
  164             else if (!strncmp(
"middot", token, 6)) text +=
"· ;
            else if (!strncmp("cedil", token, 5)) text += "¸";
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
";
 
  165             else if (!strncmp(
"cedil", token, 5)) text += 
"¸ ;
            else if (!strncmp("ordm", token, 4)) text +=  "º";
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
";
 
  166             else if (!strncmp(
"ordm", token, 4)) text +=  
"º ;
            else if (!strncmp("times", token, 5)) text += "×";
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
";
 
  167             else if (!strncmp(
"times", token, 5)) text += 
"× ;
            else if (!strncmp("divide", token, 6)) text +="÷";
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
";
 
  168             else if (!strncmp(
"divide", token, 6)) text +=
"÷ ;
            else if (!strncmp("oslash", token, 6)) text +="ø";
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
";
 
  169             else if (!strncmp(
"oslash", token, 6)) text +=
"ø ;
            continue;
        
        }
        else if (*from == '>' && !ampersand) {
            intoken = false;
            // process desired tokens
            if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
                text += "<W";
                for (unsigned int i = 27; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
                text += "<WT";
                for (unsigned int i = 25; token[i] != '\"'; i++)
                    text += token[i];
                text += '>';
                continue;
            }
            else if (!strncmp(token, "scripRef", 8)) {
                text += "<RX>";
                continue;
            }
            else if (!strncmp(token, "/scripRef", 9)) {
                text += "<Rx>";
                continue;
            }
            else if (!strncmp(token, "note", 4)) {
                text += "<RF>";
                continue;
            }
            else if (!strncmp(token, "/note", 5)) {
                text += "<Rf>";
                continue;
            }
            else if (!strncmp(token, "sup", 3)) {
                text += "<FS>";
            }
            else if (!strncmp(token, "/sup", 4)) {
                text += "<Fs>";
            }
            else if (!strnicmp(token, "font color=#ff0000", 18)) {
                text += "<FR>";
                continue;
            }
            else if (!strnicmp(token, "/font", 5)) {
                text += "<Fr>";
                continue;
            }
            else if (!strncmp(token, "div class=\"sechead\"", 19)) {
                text += "<TS>";
                sechead = true;
                continue;
            }
            else if (sechead && !strncmp(token, "/div", 19)) {
                text += "<Ts>";
                sechead = false;
                continue;
            }
            else if (!strncmp(token, "div class=\"title\"", 19)) {
                text += "<TT>";
                title = true;
                continue;
            }
            else if (title && !strncmp(token, "/div", 19)) {
                text += "<Tt>";
                title = false;
                continue;
            }
            else if (!strnicmp(token, "br", 2)) {
                text += "<CL>";
                continue;
            }
            else switch(*token) {
            case 'I':           // font tags
            case 'i':
                text += "<FI>";
                continue;
            case 'B':       // bold start
            case 'b':
                text += "<FB>";
                continue;
            case '/':
                switch(token[1]) {
                case 'P':
                case 'p':
                    text += "<CM>";
                    continue;
                case 'I':
                case 'i':       // italic end
                    text += "<Fi>";
                    continue;
                case 'B':       // bold start
                case 'b':
                    text += "<Fb>";
                    continue;
                }
            }
            continue;
        }
        if (intoken) {
            if (tokpos < 2045) {
                token[tokpos++] = *from;
                // TODO: why is this + 2 ?
                token[tokpos+2] = 0;
            }
        }
        else    text += *from;
    }
    orig = text;
    from = orig.c_str();
    for (text = ""; *from; from++) {  //loop to remove extra spaces
                if ((strchr(" \t\n\r", *from))) {
                        while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
                                from++;
                        }
                        text += " ";
                }
                else {
                        text += *from;
                }
        }
        text += (char)0;
        
    return 0;
}
SWORD_NAMESPACE_END
";
 
  173         else if (*from == 
'>' && !ampersand) {
 
  176             if (!strncmp(token, 
"sync type=\"Strongs\" value=\"", 27)) {
 
  178                 for (
unsigned int i = 27; token[i] != 
'\"'; i++)
 
  183             if (!strncmp(token, 
"sync type=\"morph\" value=\"", 25)) {
 
  185                 for (
unsigned int i = 25; token[i] != 
'\"'; i++)
 
  190             else if (!strncmp(token, 
"scripRef", 8)) {
 
  194             else if (!strncmp(token, 
"/scripRef", 9)) {
 
  198             else if (!strncmp(token, 
"note", 4)) {
 
  202             else if (!strncmp(token, 
"/note", 5)) {
 
  206             else if (!strncmp(token, 
"sup", 3)) {
 
  209             else if (!strncmp(token, 
"/sup", 4)) {
 
  212             else if (!
strnicmp(token, 
"font color=#ff0000", 18)) {
 
  216             else if (!
strnicmp(token, 
"/font", 5)) {
 
  220             else if (!strncmp(token, 
"div class=\"sechead\"", 19)) {
 
  225             else if (sechead && !strncmp(token, 
"/div", 19)) {
 
  230             else if (!strncmp(token, 
"div class=\"title\"", 19)) {
 
  235             else if (title && !strncmp(token, 
"/div", 19)) {
 
  240             else if (!
strnicmp(token, 
"br", 2)) {
 
  244             else switch(*token) {
 
  273                 token[tokpos++] = *from;
 
  283     for (text = 
""; *from; from++) {  
 
  284                 if ((strchr(
" \t\n\r", *from))) {
 
  285                         while (*(from+1) && (strchr(
" \t\n\r", *(from+1)))) {
 
#define SWORD_NAMESPACE_START
const char * c_str() const 
int strnicmp(const char *s1, const char *s2, int len)
#define SWORD_NAMESPACE_END
virtual char processText(SWBuf &text, const SWKey *key=0, const SWModule *module=0)