[sword-cvs] sword/src/modules/filters thmlfootnotes.cpp,1.6,1.7 thmlhtmlhref.cpp,1.25,1.26 thmllemma.cpp,1.5,1.6 thmlmorph.cpp,1.6,1.7 utf8greekaccents.cpp,1.7,1.8

sword@www.crosswire.org sword@www.crosswire.org
Fri, 7 Mar 2003 07:48:20 -0700


Update of /usr/local/cvsroot/sword/src/modules/filters
In directory www:/tmp/cvs-serv26251/src/modules/filters

Modified Files:
	thmlfootnotes.cpp thmlhtmlhref.cpp thmllemma.cpp thmlmorph.cpp 
	utf8greekaccents.cpp 
Log Message:
fixed some filters, esp. utf8greekaccents

Index: thmlfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlfootnotes.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** thmlfootnotes.cpp	22 Feb 2003 10:52:06 -0000	1.6
--- thmlfootnotes.cpp	7 Mar 2003 14:48:18 -0000	1.7
***************
*** 57,67 ****
  				continue;
  			}
! 			if (*from == '>') {	// process tokens
  				intoken = false;
! 				if (!strncmp(token, "note", 4)) {
  				  hide = true;
                                    continue;
  				}
! 				else if (!strncmp(token, "/note", 5)) {
  				  hide = false;
                                    continue;
--- 57,67 ----
  				continue;
  			}
! 			else if (*from == '>') { // process tokens
  				intoken = false;
! 				if (!strncmp(token.c_str(), "note", 4)) {
  				  hide = true;
                                    continue;
  				}
! 				else if (!strncmp(token.c_str(), "/note", 5)) {
  				  hide = false;
                                    continue;

Index: thmlhtmlhref.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlhtmlhref.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** thmlhtmlhref.cpp	26 Feb 2003 05:44:29 -0000	1.25
--- thmlhtmlhref.cpp	7 Mar 2003 14:48:18 -0000	1.26
***************
*** 202,207 ****
  				//char *strbuf = (char *)userData["lastTextNode"].c_str();
  				buf += userData["lastTextNode"].c_str();
! 				buf += '\"';
! 				buf += '>';
  				buf += userData["lastTextNode"].c_str();
  				// let's let text resume to output again
--- 202,207 ----
  				//char *strbuf = (char *)userData["lastTextNode"].c_str();
  				buf += userData["lastTextNode"].c_str();
! 				buf += "\">";
! 				//buf += '>';
  				buf += userData["lastTextNode"].c_str();
  				// let's let text resume to output again

Index: thmllemma.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmllemma.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** thmllemma.cpp	22 Feb 2003 10:52:06 -0000	1.5
--- thmllemma.cpp	7 Mar 2003 14:48:18 -0000	1.6
***************
*** 55,69 ****
  				continue;
  			}
! 			if (*from == '>') {	// process tokens
  				intoken = false;
! 				if (!strnicmp(token, "sync", 4) && strstr(token, "type=\"lemma\" ")) {	// Lemma
!                                         continue;
  				}
  				// if not a lemma token, keep token in text
! 				text = '<';
                                  text.append(token);
        				text += '>';
  				continue;
  			}
  			if (intoken) {
  				token += *from;
--- 55,71 ----
  				continue;
  			}
! 			else if (*from == '>') {	// process tokens
  				intoken = false;
! 				if (!strnicmp(token.c_str(), "sync", 4) && strstr(token.c_str(), " type=\"lemma\"")) {	// Lemma
! 					continue;
  				}
+ 				
  				// if not a lemma token, keep token in text
! 				text += '<';
                                  text.append(token);
        				text += '>';
  				continue;
  			}
+ 			
  			if (intoken) {
  				token += *from;

Index: thmlmorph.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlmorph.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** thmlmorph.cpp	26 Feb 2003 05:44:29 -0000	1.6
--- thmlmorph.cpp	7 Mar 2003 14:48:18 -0000	1.7
***************
*** 58,62 ****
  			if (*from == '>') {	// process tokens
  				intoken = false;
! 				if (!strnicmp(token, "sync", 4) && strstr(token, "type=\"morph\"")) {	// Morph
  				  continue;
  				}
--- 58,62 ----
  			if (*from == '>') {	// process tokens
  				intoken = false;
! 				if (!strnicmp(token.c_str(), "sync", 4) && strstr(token.c_str(), "type=\"morph\"")) {	// Morph
  				  continue;
  				}

Index: utf8greekaccents.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8greekaccents.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** utf8greekaccents.cpp	27 Feb 2003 00:56:31 -0000	1.7
--- utf8greekaccents.cpp	7 Mar 2003 14:48:18 -0000	1.8
***************
*** 36,248 ****
  
  char UTF8GreekAccents::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
- /*
- 	if (!option) {
-     unsigned char *to, *from;
  
! 	to = (unsigned char*)text;
! 	for (from = (unsigned char*)text; *from; from++) {
! 	  //first just remove combining characters
! 	  if (*from == 0xE2 && *(from + 1) == 0x80 && *(from + 2) == 0x99)
! 	    from += 2;
! 	  else if (*from == 0xCC && *(from + 1)) {
! 	    if (*(from + 1) == 0x80 || *(from + 1) == 0x81 || *(from + 1) == 0x82 || *(from + 1) == 0x88 || *(from + 1) == 0x93 || *(from + 1) == 0x94)
! 	      from++;
! 	  }
! 	  else if (*from == 0xCD && *(from + 1) == 0xBA)
! 	    from++;
! 	  //now converted pre-composed characters to their alphabetic bases, discarding the accents
  
! 	  //Greek
! 	  //capital alpha
! 	  else if ((*from == 0xCE && *(from + 1) == 0x86)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x91;
! 	    from++;
! 	  }
! 	  //capital epsilon
! 	  else if ((*from == 0xCE && *(from + 1) == 0x88)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x95;
! 	    from++;
! 	  }
! 	  //capital eta
! 	  else if ((*from == 0xCE && *(from + 1) == 0x89)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x97;
! 	    from++;
! 	  }
! 	  //capital iota
! 	  else if ((*from == 0xCE && (*(from + 1) == 0x8A || *(from + 1) == 0xAA))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x99;
! 	    from++;
! 	  }
! 	  //capital omicron
! 	  else if ((*from == 0xCE && *(from + 1) == 0x8C)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x9F;
! 	    from++;
! 	  }
! 	  //capital upsilon
! 	  else if ((*from == 0xCE && (*(from + 1) == 0x8E || *(from + 1) == 0xAB))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xA5;
! 	    from++;
! 	  }
! 	  //capital omega
! 	  else if ((*from == 0xCE && *(from + 1) == 0x8F)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xA9;
! 	    from++;
! 	  }
  
! 	  //alpha
! 	  else if ((*from == 0xCE && *(from + 1) == 0xAC)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xB1;
! 	    from++;
! 	  }
! 	  //epsilon
! 	  else if ((*from == 0xCE && *(from + 1) == 0xAD)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xB5;
! 	    from++;
! 	  }
! 	  //eta
! 	  else if ((*from == 0xCE && *(from + 1) == 0xAE)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xB7;
! 	    from++;
! 	  }
! 	  //iota
! 	  else if ((*from == 0xCE && *(from + 1) == 0xAF) || (*from == 0xCF && *(from + 1) == 0x8A)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xB9;
! 	    from++;
! 	  }
! 	  //omicron
! 	  else if ((*from == 0xCF && *(from + 1) == 0x8C)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xBF;
! 	    from++;
! 	  }
! 	  //upsilon
! 	  else if ((*from == 0xCE && *(from + 1) == 0x88) || (*from == 0xCF && (*(from + 1) == 0x8B || *(from + 1) == 0x8D))) {
! 	    *to++ = 0xCF;
! 	    *to++ = 0x85;
! 	    from++;
! 	  }
! 	  //omega
! 	  else if ((*from == 0xCF && *(from + 1) == 0x8E)) {
! 	    *to++ = 0xCF;
! 	    *to++ = 0x89;
! 	    from++;
! 	  }
  
! 	  //Extended Greek
! 	  //capital alpha
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x88 && *(from + 2) <= 0x8F) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBC)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x91;
! 	    from+=2;
! 	  }
! 	  //capital epsilon
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0x98 && *(from + 2) <= 0x9D) || (*(from + 1) == 0xBF && (*(from + 2) == 0x88 || *(from + 2) == 0x89)))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x95;
! 	    from+=2;
! 	  }
! 	  //capital eta
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAF) || (*(from + 1) == 0xBE && *(from + 2) >= 0x98 && *(from + 2) <= 0x9F) || (*(from + 1) == 0xBF && *(from + 2) >= 0x8A && *(from + 2) <= 0x8C))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x97;
! 	    from+=2;
! 	  }
! 	  //capital iota
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBF) || (*(from + 1) == 0xBF && *(from + 2) >= 0x98 && *(from + 2) <= 0x9B))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x99;
! 	    from+=2;
! 	  }
! 	  //capital omicron
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBD && *(from + 2) >= 0x88 && *(from + 2) <= 0x8D) || (*(from + 1) == 0xBF && *(from + 2) == 0xB8 || *(from + 2) == 0xB9))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0x9F;
! 	    from+=2;
! 	  }
! 	  //capital upsilon
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBD && *(from + 2) >= 0x99 && *(from + 2) <= 0x9F) || (*(from + 1) == 0xBF && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAB))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xA5;
! 	    from+=2;
! 	  }
! 	  //capital omega
! 	  else if (*from == 0xE1 && (((*(from + 1) == 0xBD || *(from + 1) == 0xBE) && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAF) || (*(from + 1) == 0xBF && *(from + 2) >= 0xBA && *(from + 2) <= 0xBC))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xA9;
! 	    from+=2;
! 	  }
! 	  //capital rho
! 	  else if (*from == 0xE1 && *(from + 1) == 0xBF && *(from + 2) == 0xAC) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xA1;
! 	    from+=2;
! 	  }
  
! 	  //alpha
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x80 && *(from + 2) <= 0x87) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB0 || *(from + 2) == 0xB1)) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7)) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xB1;
! 	    from+=2;
! 	  }
! 	  //epsilon
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0x90 && *(from + 2) <= 0x95) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB2 || *(from + 2) == 0xB3)))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xB5;
! 	    from+=2;
! 	  }
! 	  //eta
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBE && *(from + 2) >= 0x90 && *(from + 2) <= 0x97) || (*(from + 1) == 0xBC && *(from + 2) >= 0xA0 && *(from + 2) <= 0xA7) || (*(from + 1) == 0xBF && *(from + 2) >= 0x82 && *(from + 2) <= 0x87) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB4 || *(from + 2) == 0xB5)))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xB7;
! 	    from+=2;
! 	  }
! 	  //iota
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB6 || *(from + 2) == 0xB7)) || (*(from + 1) == 0xBF && *(from + 2) >= 0x90 && *(from + 2) <= 0x97))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xB9;
! 	    from+=2;
! 	  }
! 	  //omicron
! 	  else if (*from == 0xE1 && (*(from + 1) == 0xBD && ((*(from + 2) >= 0x80 && *(from + 2) <= 0x85) || (*(from + 2) == 0xB8 || *(from + 2) == 0xB9)))) {
! 	    *to++ = 0xCE;
! 	    *to++ = 0xBF;
! 	    from+=2;
! 	  }
! 	  //upsilon
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBD && ((*(from + 2) >= 0x90 && *(from + 2) <= 0x97) || *(from + 2) == 0xBA || *(from + 2) == 0xBB)) || (*(from + 1) == 0xBF && ((*(from + 2) >= 0xA0 && *(from + 2) <= 0xA3) || *(from + 2) == 0xA6 || *(from + 2) == 0xA7)))) {
! 	    *to++ = 0xCF;
! 	    *to++ = 0x85;
! 	    from+=2;
! 	  }
! 	  //omega
! 	  else if (*from == 0xE1 && ((*(from + 1) == 0xBD && ((*(from + 2) >= 0xA0 && *(from + 2) <= 0xA7) || (*(from + 2) == 0xBC || *(from + 2) == 0xBD))) || (*(from + 1) == 0xBE && (*(from + 2) >= 0xA0 && *(from + 2) <= 0xA7)) || (*(from + 1) == 0xBF && *(from + 2) >= 0xB2 && *(from + 2) <= 0xB7))) {
! 	    *to++ = 0xCF;
! 	    *to++ = 0x89;
! 	    from+=2;
! 	  }
! 	  //rho
! 	  else if (*from == 0xE1 && *(from + 1) == 0xBF && (*(from + 2) == 0xA4 && *(from + 2) == 0xA5)) {
! 	    *to++ = 0xCF;
! 	    *to++ = 0x81;
! 	    from+=2;
! 	  }
! 	  else
! 	    *to++ = *from;
  	}
- 	*to++ = 0;
- 	*to = 0;
-      }
- */
  	return 0;
  }
--- 36,252 ----
  
  char UTF8GreekAccents::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  
! 	if (!option) { //we don't want greek accents
!     		//unsigned char *to, *from;
! 		//to = (unsigned char*)text;
! 		//for (from = (unsigned char*)text; *from; from++) {
! 		
! 		SWBuf orig = text;
! 		const unsigned char* from = (unsigned char*)orig.c_str();
! 		for (text = ""; *from; from++) {		
! 			//first just remove combining characters
! 			if (*from == 0xE2 && *(from + 1) == 0x80 && *(from + 2) == 0x99) {
! 				from += 2;
! 			}
! 			else if (*from == 0xCC && *(from + 1)) {
! 				if (*(from + 1) == 0x80 || *(from + 1) == 0x81 || *(from + 1) == 0x82 || *(from + 1) == 0x88 || *(from + 1) == 0x93 || *(from + 1) == 0x94) {
! 					from++;
! 				}
! 			}
! 			else if (*from == 0xCD && *(from + 1) == 0xBA) {
! 				from++;
! 			}
! 			//now converted pre-composed characters to their alphabetic bases, discarding the accents
  
! 			//Greek
! 			//capital alpha
! 			else if ((*from == 0xCE && *(from + 1) == 0x86)) {
! 				text += 0xCE;
! 				text += 0x91;
! 				from++;
! 			}
! 			//capital epsilon
! 			else if ((*from == 0xCE && *(from + 1) == 0x88)) {
! 				text += 0xCE;
! 				text += 0x95;
! 				from++;
! 			}
! 			//capital eta
! 			else if ((*from == 0xCE && *(from + 1) == 0x89)) {
! 				text += 0xCE;
! 				text += 0x97;
! 				from++;
! 			}
! 			//capital iota
! 			else if ((*from == 0xCE && (*(from + 1) == 0x8A || *(from + 1) == 0xAA))) {
! 				text += 0xCE;
! 				text += 0x99;
! 				from++;
! 			}
! 			//capital omicron
! 			else if ((*from == 0xCE && *(from + 1) == 0x8C)) {
! 				text += 0xCE;
! 				text += 0x9F;
! 				from++;
! 			}
! 			//capital upsilon
! 			else if ((*from == 0xCE && (*(from + 1) == 0x8E || *(from + 1) == 0xAB))) {
! 				text += 0xCE;
! 				text += 0xA5;
! 				from++;
! 			}
! 			//capital omega
! 			else if ((*from == 0xCE && *(from + 1) == 0x8F)) {
! 				text += 0xCE;
! 				text += 0xA9;
! 				from++;
! 			}
  
! 			//alpha
! 			else if ((*from == 0xCE && *(from + 1) == 0xAC)) {
! 				text += 0xCE;
! 				text += 0xB1;
! 				from++;
! 			}
! 			//epsilon
! 			else if ((*from == 0xCE && *(from + 1) == 0xAD)) {
! 				text += 0xCE;
! 				text += 0xB5;
! 				from++;
! 			}
! 			//eta
! 			else if ((*from == 0xCE && *(from + 1) == 0xAE)) {
! 				text += 0xCE;
! 				text += 0xB7;
! 				from++;
! 			}
! 			//iota
! 			else if ((*from == 0xCE && *(from + 1) == 0xAF) || (*from == 0xCF && *(from + 1) == 0x8A)) {
! 				text += 0xCE;
! 				text += 0xB9;
! 				from++;
! 			}
! 			//omicron
! 			else if ((*from == 0xCF && *(from + 1) == 0x8C)) {
! 				text += 0xCE;
! 				text += 0xBF;
! 				from++;
! 			}
! 			//upsilon
! 			else if ((*from == 0xCE && *(from + 1) == 0x88) || (*from == 0xCF && (*(from + 1) == 0x8B || *(from + 1) == 0x8D))) {
! 				text += 0xCF;
! 				text += 0x85;
! 				from++;
! 			}
! 			//omega
! 			else if ((*from == 0xCF && *(from + 1) == 0x8E)) {
! 				text += 0xCF;
! 				text += 0x89;
! 				from++;
! 			}
  
! 			//Extended Greek
! 			//capital alpha
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x88 && *(from + 2) <= 0x8F) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBC)) {
! 				text += 0xCE;
! 				text += 0x91;
! 				from+=2;
! 			}
! 			//capital epsilon
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0x98 && *(from + 2) <= 0x9D) || (*(from + 1) == 0xBF && (*(from + 2) == 0x88 || *(from + 2) == 0x89)))) {
! 				text += 0xCE;
! 				text += 0x95;
! 				from+=2;
! 			}
! 			//capital eta
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAF) || (*(from + 1) == 0xBE && *(from + 2) >= 0x98 && *(from + 2) <= 0x9F) || (*(from + 1) == 0xBF && *(from + 2) >= 0x8A && *(from + 2) <= 0x8C))) {
! 				text += 0xCE;
! 				text += 0x97;
! 				from+=2;
! 			}
! 			//capital iota
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBF) || (*(from + 1) == 0xBF && *(from + 2) >= 0x98 && *(from + 2) <= 0x9B))) {
! 				text += 0xCE;
! 				text += 0x99;
! 				from+=2;
! 			}
! 			//capital omicron
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBD && *(from + 2) >= 0x88 && *(from + 2) <= 0x8D) || (*(from + 1) == 0xBF && *(from + 2) == 0xB8 || *(from + 2) == 0xB9))) {
! 				text += 0xCE;
! 				text += 0x9F;
! 				from+=2;
! 			}
! 			//capital upsilon
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBD && *(from + 2) >= 0x99 && *(from + 2) <= 0x9F) || (*(from + 1) == 0xBF && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAB))) {
! 				text += 0xCE;
! 				text += 0xA5;
! 				from+=2;
! 			}
! 			//capital omega
! 			else if (*from == 0xE1 && (((*(from + 1) == 0xBD || *(from + 1) == 0xBE) && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAF) || (*(from + 1) == 0xBF && *(from + 2) >= 0xBA && *(from + 2) <= 0xBC))) {
! 				text += 0xCE;
! 				text += 0xA9;
! 				from+=2;
! 			}
! 			//capital rho
! 			else if (*from == 0xE1 && *(from + 1) == 0xBF && *(from + 2) == 0xAC) {
! 				text += 0xCE;
! 				text += 0xA1;
! 				from+=2;
! 			}
  
! 			//alpha
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x80 && *(from + 2) <= 0x87) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB0 || *(from + 2) == 0xB1)) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7)) {
! 				text += 0xCE;
! 				text += 0xB1;
! 				from+=2;
! 			}
! 			//epsilon
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0x90 && *(from + 2) <= 0x95) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB2 || *(from + 2) == 0xB3)))) {
! 				text += 0xCE;
! 				text += 0xB5;
! 				from+=2;
! 			}
! 			//eta
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBE && *(from + 2) >= 0x90 && *(from + 2) <= 0x97) || (*(from + 1) == 0xBC && *(from + 2) >= 0xA0 && *(from + 2) <= 0xA7) || (*(from + 1) == 0xBF && *(from + 2) >= 0x82 && *(from + 2) <= 0x87) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB4 || *(from + 2) == 0xB5)))) {
! 				text += 0xCE;
! 				text += 0xB7;
! 				from+=2;
! 			}
! 			//iota
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB6 || *(from + 2) == 0xB7)) || (*(from + 1) == 0xBF && *(from + 2) >= 0x90 && *(from + 2) <= 0x97))) {
! 				text += 0xCE;
! 				text += 0xB9;
! 				from+=2;
! 			}
! 			//omicron
! 			else if (*from == 0xE1 && (*(from + 1) == 0xBD && ((*(from + 2) >= 0x80 && *(from + 2) <= 0x85) || (*(from + 2) == 0xB8 || *(from + 2) == 0xB9)))) {
! 				text += 0xCE;
! 				text += 0xBF;
! 				from+=2;
! 			}
! 			//upsilon
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBD && ((*(from + 2) >= 0x90 && *(from + 2) <= 0x97) || *(from + 2) == 0xBA || *(from + 2) == 0xBB)) || (*(from + 1) == 0xBF && ((*(from + 2) >= 0xA0 && *(from + 2) <= 0xA3) || *(from + 2) == 0xA6 || *(from + 2) == 0xA7)))) {
! 				text += 0xCF;
! 				text += 0x85;
! 				from+=2;
! 			}
! 			//omega
! 			else if (*from == 0xE1 && ((*(from + 1) == 0xBD && ((*(from + 2) >= 0xA0 && *(from + 2) <= 0xA7) || (*(from + 2) == 0xBC || *(from + 2) == 0xBD))) || (*(from + 1) == 0xBE && (*(from + 2) >= 0xA0 && *(from + 2) <= 0xA7)) || (*(from + 1) == 0xBF && *(from + 2) >= 0xB2 && *(from + 2) <= 0xB7))) {
! 				text += 0xCF;
! 				text += 0x89;
! 				from+=2;
! 			}
! 			//rho
! 			else if (*from == 0xE1 && *(from + 1) == 0xBF && (*(from + 2) == 0xA4 && *(from + 2) == 0xA5)) {
! 				text += 0xCF;
! 				text += 0x81;
! 				from+=2;
! 			}
! 			else { //no characters we filter
! 				text += *from;
! 			}
! 		}
  	}
  	return 0;
  }