<html> <head> <B><Font color = darkblue><CENTER> APS-DV-PRAKASH <==> / B ( ?  K ! + < K # M  * 0 ? 5 0 M $ ? $ M 0 (10-09-2009 18:15)</font></title> <Font color = blue></title> : Last update: 03-11-2011 14:00</B><br> Note: For conversion of text encoded in APS-DV-PRAKASH into unicode, copy the text from M S Word and<br> paste it in Wordpad, then copy from it and paste it in the input box of converter. <script type="text/javascript"> function convert_to_unicode() { var array_one = new Array( "F", "eq","ef","ss","Rb","==","g","gb","b","s","t","&s", "e&","e@","eW", "e","eR","Dee@","X","x","Z","z","eA","ea","","e|","eE","eR","e", ": e","kes","ke=","keg","ke","He","pe","Ke","e","ie","He","he","He","he", "ke","K", "","~","$e+", "","", "Re","R","Se","S","",""!","", "xe","xe","axe","\"xe","[xe","{xe", //"keb",": es", "","$","",": ","","","","","","","", "#","%","V"," ","& ","0 ","9 "," "," ","","","","","","", "","","","","","","","","","","","","","", "","","","","","","","","","", "[","{", ">","x","^","","","", "De", "F&","F","G","","S","T", "ke","ke","","K","i","I","*", "","","p","P","_", "a","\"","[","{","C", "l","L","o","O","v", "h","H","y","Y","c", // "he","he", "","j","u","}","","k","J","U","M","","","<","m","","n","N", "er","e","","",""," ","! ","","","","", "g","","t","","=","","s","w","b","B","`","d","]","","@","","", "Q","W", "0","1","2","3","4","5","6","7","8","9", "M > ","M K ","M L "," K "," > "," H "," G ","> K ","> E ","E > ","> G "," G ", " A ","G G "," H ","> G "," G "," > "," E ","> H ","H > "," C ", " > "," B ","G > "," G ","> G  ","E  "," E ","  "," B ","G G ") // Remove typing mistakes in the original file var array_two = new Array( "  ", "","","s","R","=","g","gb","b","s","t","s&", "e&","e@","eW", " M $ ","@  "," ","G  &","G &","H  &","H &","@  &","@ &"," &","0 M ","?  ","?  ","?  ", " M 0 "," G "," C "," A ","X ","^ ","[ ","Y ","_ ","Z ","+ ","+ ","+ M ","+ M ", "X M ","Y M ", "P ","d "," ", "M 0 B ","M 0 A ", "8 M $ M 0 ","8 M $ M 0 M ","8 M 0 ","8 M 0 M ","0 A ","0 B ","0 B ", "7 M  M / "," M  M / "," M / "," M / ","! M / ","" M / ", //"  "," M 0 G ", "6 M 0 M ","$ M 0 M "," M 0 M ","5 M 0 M "," M 0 M ","9 M ( ","* M 0 M ","9 M 0 "," M 0 M ","* M 0 M ","& M 0 ", " M 7 M "," M  M ","( M ( M ","7 M  ","7 M ","7 M "," M  "," M  "," M  ","9 M / M ","9 M 5 ","9 M 2 ","& M . M "," M ","6 M  M ", "7 M  ","! M " "," M  "," M  M "," M  ","& C "," M  M ","5 M ( M ","& M / M ","& M - "," M  ","& M 5 ","" M " ","6 M 5 M ", "& M ' ","! M ! ","$ M $ M "," M  ","& M , ","& M & ","9 C "," M ","& M  ","9 M . M ", "\ ","] ", "M ( ","M / M ","M 0 ","M 0 ","M 0 ","M 2 ", " ", " "," "," "," "," "," ", " M "," "," M 0 M "," M "," M "," M "," ", " M "," "," M "," M "," M ", " "," ","! ","" ","# M ", "$ M ","% M ","& ","' M ","( M ", "* M ","* M ",", M ","- M ",". M ", // "+ M ","+ ", "/ M ","0 ","2 M ","2 ","3 M ","5 M ","5 M ","3 ","6 M ","6 M ","6 M ","7 M ","8 M ","9 M ","9 ","0 M ", "@ ","> ","> ","> ","> ","> ","> ","> ","> ","> ","> ", "A ","A ","B ","B ","C ","b ","G ","H "," "," "," ","M ","< ","< ","E ","= ","p ", "H  ","G  ", "f ","g ","h ","i ","j ","k ","l ","m ","n ","o ", "","G ","H "," "," "," "," ","K ","I ","I ","K "," ", "A  ","G "," H ","K "," G ",">  "," E ","L ","L ","C  ", ">  ","B  ","K ","G  ","K  "," "," "," :","B  ","G ") // Remove typing mistakes in the original file //************************************************************************************** // // Punctuation marks incorporated at the end //****************************************************** // Special glyphs //****************************************************** // "X", "x", "Z", "z", "eA", "ea", "", // "0 M G  ", "0 M G ", "0 M H  ", "0 M H ", "0 M @  ", "0 M @ ", "0 M  ", // // "e\\", "e|", "eE", "eR", "e", // "0 M ?  ", "0 M ? ", "?  ", "?  ", "?  ", //****************************************************** // ikAr and reph //****************************************************** // "ef","eq", // "? ","? ", // // "&","N", // "reph","reph (Marathi)", //************************************************************************************** var array_one_length = array_one.length ; var modified_substring = document.getElementById("legacy_text").value ; document.getElementById("unicode_text").value = "Conversion in progress.." ; //**************************************************** // Break the long text into small bunches of chunk_size characters each. //**************************************************** var text_size = modified_substring.length ; var processed_text = '' ; //blank var sthiti1 = 0 ; var sthiti2 = 0 ; var chale_chalo = 1 ; var chunk_size = 6000; // this charecter long text will be processed in one go. while ( chale_chalo == 1 ) { sthiti1 = sthiti2 ; if ( sthiti2 < ( text_size - chunk_size ) ) { sthiti2 += chunk_size ; // while (document.getElementById("legacy_text").value.charAt ( sthiti2 ) != ' ') {sthiti2--;} //This was making problem if there is no 'space' in the whole document. } else { sthiti2 = text_size ; chale_chalo = 0 } var modified_substring = document.getElementById("legacy_text").value.substring ( sthiti1, sthiti2 ) ; Replace_Symbols( ) ; var processed_text = processed_text + modified_substring ; document.getElementById("unicode_text").value = "Conversion in progress.." + '\n\n' + 'Conversion of ' + sthiti2 + ' charecters out of ' + text_size + ' completed.' ; } document.getElementById("unicode_text").value = processed_text ; // -------------------------------------------------- function Replace_Symbols( ) { //substitute array_two elements in place of corresponding array_one elements if ( modified_substring != "" ) // if stringto be converted is non-blank then no need of any processing. { for ( input_symbol_idx = 0; input_symbol_idx < array_one_length; input_symbol_idx++ ) { // alert(" modified substring = "+modified_substring) //*********************************************************** // if (input_symbol_idx==106) // { alert(" input_symbol_idx = "+input_symbol_idx); // alert(" input_symbol_idx = "+input_symbol_idx) //; alert(" character =" + modified_substring.CharCodeAt(input_symbol_idx)) // alert(" character = "+modified_string.fromCharCode(input_symbol_idx)) // } // if (input_symbol_idx == 107) // { alert(" input_symbol_idx = "+input_symbol_idx); // alert(" character = ",+string.fromCharCode(input_symbol_idx)) // } //*********************************************************** idx = 0 ; // index of the symbol being searched for replacement while (idx != -1 ) //while-00 { modified_substring = modified_substring.replace( array_one[ input_symbol_idx ] , array_two[input_symbol_idx] ) idx = modified_substring.indexOf( array_one[input_symbol_idx] ) } // end of while-00 loop // alert(" end of while loop") } // end of for loop // alert(" end of for loop") // alert(" modified substring2 = "+modified_substring) //******************************************************* var position_of_i = modified_substring.indexOf( "" ) while ( position_of_i != -1 ) //while-02 { var charecter_next_to_i = modified_substring.charAt( position_of_i + 1 ) var charecter_to_be_replaced = "" + charecter_next_to_i modified_substring = modified_substring.replace( charecter_to_be_replaced , charecter_next_to_i + "? " ) position_of_i = modified_substring.search( // , position_of_i + 1 ) // search for i ahead of the current position. } // end of while-02 loop //********************************************************************************** // End of Code for Replacing four Special glyphs //********************************************************************************** // following loop to eliminate 'chhotee ee kee maatraa' on half-letters as a result of above transformation. var position_of_wrong_ee = modified_substring.indexOf( "? M " ) while ( position_of_wrong_ee != -1 ) //while-03 { var consonent_next_to_wrong_ee = modified_substring.charAt( position_of_wrong_ee + 2 ) var charecter_to_be_replaced = "? M " + consonent_next_to_wrong_ee modified_substring = modified_substring.replace( charecter_to_be_replaced , "M " + consonent_next_to_wrong_ee + "? " ) position_of_wrong_ee = modified_substring.search( /? M / , position_of_wrong_ee + 2 ) // search for 'wrong ee' ahead of the current position. } // end of while-03 loop // following loop to eliminate 'chhotee ee kee maatraa' on half-letters as a result of above transformation. var position_of_wrong_ee = modified_substring.indexOf( "?  M " ) while ( position_of_wrong_ee != -1 ) //while-03 { var consonent_next_to_wrong_ee = modified_substring.charAt( position_of_wrong_ee + 3 ) var charecter_to_be_replaced = "?  M " + consonent_next_to_wrong_ee modified_substring = modified_substring.replace( charecter_to_be_replaced , "M " + consonent_next_to_wrong_ee + "?  " ) position_of_wrong_ee = modified_substring.search( /?  M / , position_of_wrong_ee + 3 ) // search for 'wrong ee' ahead of the current position. } // end of while-03 loop // Eliminating reph "" and putting 'half - r' at proper position for this. set_of_matras = "> ? @ A B C G H K L  :  E " //***************************************************************** var position_of_R = modified_substring.indexOf( "&" ) // alert(" 1. modified_substring = "+modified_substring ); // alert(" 2. position_of_R = "+position_of_R ) while ( position_of_R > 0 ) // while-04 { probable_position_of_half_r = position_of_R - 1 ; //alert(" 3. probable_position_of_half_r = "+probable_position_of_half_r ); var character_at_probable_position_of_half_r = modified_substring.charAt( probable_position_of_half_r ) //alert(" 4. character_at_probable_position_of_half_r = "+character_at_probable_position_of_half_r ); //************************************************************ // trying to find non-maatra position left to current O (ie, half -r). //************************************************************ while ( set_of_matras.match( character_at_probable_position_of_half_r ) != null ) // while-05 // some vowel maatraa or anusvaar found, move to previous character { probable_position_of_half_r = probable_position_of_half_r - 1 ; character_at_probable_position_of_half_r = modified_substring.charAt( probable_position_of_half_r ) ; //alert(" 5. probable_position_of_half_r = "+probable_position_of_half_r ); //alert(" 6. character_at_probable_position_of_half_r = "+character_at_probable_position_of_half_r ); } // end of while-05 //************************************************************ // check if the previous character to the present character is a halant //************************************************************ var previous_to_position_of_half_r = probable_position_of_half_r - 1 ; //alert(" 7. previous_to_position_of_half_r = "+previous_to_position_of_half_r ); if (previous_to_position_of_half_r > 0) // if-03 { var character_previous_to_position_of_half_r = modified_substring.charAt( previous_to_position_of_half_r ) //alert(" 8. character_previous_to_position_of_half_r = "+character_previous_to_position_of_half_r ); while ("M ".match( character_previous_to_position_of_half_r ) != null ) // while-06 // halant found, move to previous character { probable_position_of_half_r = previous_to_position_of_half_r - 1 ; character_at_probable_position_of_half_r = modified_substring.charAt( probable_position_of_half_r ) ; //alert(" 9. probable_position_of_half_r = "+probable_position_of_half_r ); //alert("10. character_at_probable_position_of_half_r = "+character_at_probable_position_of_half_r ); previous_to_position_of_half_r = probable_position_of_half_r - 1 ; character_previous_to_position_of_half_r = modified_substring.charAt( previous_to_position_of_half_r ) //alert("11. previous_to_position_of_half_r = "+previous_to_position_of_half_r ); //alert("12. character_previous_to_position_of_half_r = "+character_previous_to_position_of_half_r ); } // end of while-06 } // end of if-03 //************************************************************ character_to_be_replaced = modified_substring.substr ( probable_position_of_half_r , ( position_of_R - probable_position_of_half_r ) ) ; new_replacement_string = "0 M " + character_to_be_replaced ; character_to_be_replaced = character_to_be_replaced + "&" ; modified_substring = modified_substring.replace( character_to_be_replaced , new_replacement_string ) ; position_of_R = modified_substring.indexOf( "&" ) ; //alert("13. character_to_be_replaced = "+character_to_be_replaced ); //alert("14. modified_substring = "+modified_substring ); } // end of while-04 } // end of IF statement meant to supress processing of blank string. } // end of the function Replace_Symbols } // end of convert_to_unicode function //******************************************************************************* function convert_to_Prakash() { var array_one = new Array(" ", " ", "\"", // "M ", "M ,", "M ;", "M d ", //"0 M / ","0 M 9 ", // " < "," < "," < "," < ","! < ","" < ","+ < ", // two-byte varnas //07 "+ M 0 "," "," M $ "," M 0 "," G "," C "," A ", "X M ","Y M ","X ","^ ","[ ","Y ","_ ","Z ", //"+ ","+ ","+ M ","+ M ", //16 "$ M 0 ","6 M 0 ","8 M 0 "," M 0 ","5 M 0 "," M 0 ","* M 0 ","9 M 0 "," M 0 ", "$ M 0 M ","6 M 0 M ","8 M 0 M "," M 0 M ","5 M 0 M "," M 0 M ","* M 0 M "," M 0 M ", "& M 0 ", " M 0 ","' M 0 ",", M 0 ","- M 0 ",". M 0 ", " M 0 "," M 0 "," M 0 ","! M 0 ","" M 0 ", "M 0 B ","M 0 A ","0 A ","0 B ", //" M 0 ","' M 0 ",", M 0 ","- M 0 ",". M 0 ", //"7 M  M 0 ", "0 A ","0 B ", "P ","d ", "\|", " ", //03 "8 M $ M 0 ","8 M $ M 0 M ", //07 " M 7 ? ","$ M 0 ? "," M  ? ","6 M 0 ? ", //04 "9 M ( ", //13 //"M 0 B ","M 0 A ","0 A ","0 B ", " M 7 M "," M 7 "," M  M "," M  ","( M ( M ","( M ( ","7 M ","7 M "," M  "," M  "," M  ","9 M / M ","9 M / ","9 M 5 ","9 M 2 ","& M . M ","& M . "," M ", //"6 M  M ","6 M  ", //17 "! M " "," M  "," M  M "," M  "," M  ","& C ", " M  M ","5 M ( M ","& M / M "," M  ","5 M ( ","& M / ","& M - "," M  ","& M 5 ","" M " ","6 M 5 M ","6 M 5 ", //15 "7 M  M 0 ","7 M  ", "& M ' ","! M ! ","$ M $ M ","$ M $ "," M  ","& M , ","& M & ","9 C "," M ","& M  ","9 M . M ","9 M . ", //10 "\ ","] ", //02 "7 M  M / "," M  M / "," M / "," M / ","! M / ","" M / ", //"  "," M 0 G ", "M 0 ", //07 //"M ( ","M 2 ", //03 " M "," "," M "," "," M "," "," M "," "," ", //09 " M "," "," ","[ M ","[ "," M "," "," M "," "," M "," ", //11 " "," ","! ","" ","# M ","# ", //06 "$ M ","$ ","% M ","% ","& ","' M ","' ","( M ","( ", //09 "* M ","* ","+ M ","+ ",", M ",", ","- M ","- ",". M ",". ", //10 "6 C ","/ M ","/ ","0 ","2 M ","2 ","3 M ","3 ","5 M ","5 ","6 M ","6 ","7 M ","7 ","8 M ","8 ","9 M ","9 ", //18 // "6 M ","6 M ", "M / M ",//"0 M ", " "," "," "," "," "," "," "," "," "," "," "," "," ", //13 "L ","K ","I ","> ","@ ","A ","B ","C ","b ","G ","H "," "," "," ","M ","E ","= ","< ","p ", //18 "f ","g ","h ","i ","j ","k ","l ","m ","n ","o " ) var array_two = new Array(" ", " ", "'", // "d ", "d\,", "d\;", "d~", //"Ne","Nn", // "X ","Y ","Z ","[ ","\ ","] ","^ ", //one-byte varnas "e","Dee@","e",": e","kes","ke=","keg", "ke","K","ke","He","pe","Ke","e","ie", //"He","he","He","he", "$e","e","Se","e",": e","e","e","","e", "$","","S","",": ","","","", "", "Ie","Oe","ye","Ye","ce", "^","a^","\"^","[^","{^", "","","",""!", "","~", "~", "$e+", "Re","R", "ef#e","ef$e","ef%e","efe", "", //"","","",""!", "#","#e","%","%e","V","Ve","& ","0 ","9 "," "," ","","e","","","","e","", //"","e", "","","","e","","", "","","","e","e","e","","","","","","e", //"^","", "","","","e","","","","","","","","e", "[","{", "xe","xe","axe","\"xe","[xe","{xe", //"keb",": es", "", //">","", "ke","ke","K","Ke","i","ie","I","Ie","*", "","e","","[p","[pe","p","pe","P","Pe","_","_e", "a","\"","[","{","C","Ce", "l","le","L","Le","o","O","Oe","v","ve", "h","he","he","he","y","ye","Y","Ye","c","ce", "e=","","e","j","u","}","","U","k","ke","M","Me","<","<e","m","me","","n", // "","", "x",//"N", "Deew","Dees","Dee@","Dee","De","F&","F","G","T","$e+","","Ss","S", "ew","es","e@","e","er","g","t","=","","s","w","B","b","`","d","@","","","", "0","1","2","3","4","5","6","7","8","9" ) //************************************************************ //Put "Enter chunk size:" line before "<textarea name= ..." if required to be used. //************************************************************ //Enter chunk size: <input type="text" name="chunksize" value="6000" size="7" maxsize="7" style="text-align:right"><br/><br/> //************************************************************ // The following two characters are to be replaced through proper checking of locations: //****************************************************** // ikAr and reph //****************************************************** // "ef","eq", // "? ","? ", // // "&","N", // "reph","reph (Marathi)", //************************************************************************************** var array_one_length = array_one.length ; var modified_substring = document.getElementById("unicode_text").value + " " ; // an space added to help recognise halant at the end of file document.getElementById("legacy_text").value = "Conversion in progress.." ; //**************************************************** // Break the long text into small bunches of chunk_size characters each. //**************************************************** var text_size = modified_substring.length ; var processed_text = '' ; //blank var sthiti1 = 0 ; var sthiti2 = 0 ; var chale_chalo = 1 ; var chunk_size = 6000; // this charecter long text will be processed in one go. while ( chale_chalo == 1 ) { sthiti1 = sthiti2 ; if ( sthiti2 < ( text_size - chunk_size ) ) { sthiti2 += chunk_size ; // while (document.getElementById("unicode_text").value.charAt ( sthiti2 ) != ' ') {sthiti2--;} //This was making problem if there is no 'space' in the whole document. } else { sthiti2 = text_size ; chale_chalo = 0 } var modified_substring = document.getElementById("unicode_text").value.substring ( sthiti1, sthiti2 ) ; Replace_Symbols( ) ; var processed_text = processed_text + modified_substring ; document.getElementById("legacy_text").value = "Conversion in progress.." + '\n\n' + 'Conversion of ' + sthiti2 + ' charecters out of ' + text_size + ' completed.' ; } document.getElementById("legacy_text").value = processed_text ; // -------------------------------------------------- function Replace_Symbols( ) { // if string to be converted is non-blank then no need of any processing. if (modified_substring != "" ) { modified_substring = modified_substring.replace ( /\)/g , " \)" ) ; modified_substring = modified_substring.replace ( /& M 0 M /g , "d" ) ; // Halanta after which there is no constant but space, hypen, comma or full-stop etc modified_substring = modified_substring.replace ( /M ([ \,\;\.d \n\-\:])/g , "d$1" ) ; // modified_substring = modified_substring.replace ( /[M ]([^         ! \ " ] # $ % & ' ( * + , - . / 0 2 3 5 6 7 8 9  M 7  M  ])/g , "d$1" ) ; // maraathi style reph modified_substring = modified_substring.replace ( /1 M /g , "N" ) ; // maraathi style reph ; there is a hidden ZWJ after 0 M modified_substring = modified_substring.replace ( /0 M /g , "N" ) ; modified_substring = modified_substring.replace ( /$ M 0 M / /g , "$/ " ) ; modified_substring = modified_substring.replace ( /6 M 0 M / /g , "/ " ) ; // first replace the two-byte nukta_varNa with corresponding one-byte nukta varNas. modified_substring = modified_substring.replace ( / < /g , "X " ) ; modified_substring = modified_substring.replace ( / < /g , "Y " ) ; modified_substring = modified_substring.replace ( / < /g , "Z " ) ; modified_substring = modified_substring.replace ( / < /g , "[ " ) ; modified_substring = modified_substring.replace ( /! < /g , "\ " ) ; modified_substring = modified_substring.replace ( /" < /g , "] " ) ; // modified_substring = modified_substring.replace ( /( < /g , ") " ) ; modified_substring = modified_substring.replace ( /+ < /g , "^ " ) ; // modified_substring = modified_substring.replace ( // < /g , "_ " ) ; // modified_substring = modified_substring.replace ( /0 < /g , "1 " ) ; // code for replacing "? " (chhotee ee kii maatraa) with "ef" and correcting its position too. var position_of_f = modified_substring.indexOf( "? " ) ; while ( position_of_f != -1 ) //while-02 { var character_left_to_f = modified_substring.charAt( position_of_f - 1 ) ; modified_substring = modified_substring.replace( character_left_to_f + "? " , "" + character_left_to_f ) ; position_of_f = position_of_f - 1 ; while (( modified_substring.charAt( position_of_f - 1 ) == "M " ) & ( position_of_f != 0 ) ) { var string_to_be_replaced = modified_substring.charAt( position_of_f - 2) + "M " ; modified_substring = modified_substring.replace( string_to_be_replaced + "", "" + string_to_be_replaced ) ; position_of_f = position_of_f - 2 ; } position_of_f = modified_substring.search( /? / , position_of_f + 1 ) ; // search for f ahead of the current position. } // end of while-02 loop //************************************************************ // modified_substring = modified_substring.replace( /f0 M /g , "" ) ; //************************************************************ // Eliminating "0 M " and putting Z at proper position for this. set_of_matras = "> ? @ A B C G H K L    E " modified_substring += ' ' ; // add two spaces after the string to avoid UNDEFINED char in the following code. // modified_substring = modified_substring.replace ( /-/g , "" ) ; // modified_substring = modified_substring.replace ( /6 M 0 M /g , "E" ) ; var space = " " var position_of_half_R = modified_substring.indexOf( "0 M " ) ; //************************************************************************************ while ( position_of_half_R > 0 ) // while-03 { // "0 M " is two bytes long var probable_position_of_Z = position_of_half_R + 2 ; var character_at_probable_position_of_Z = modified_substring.charAt( probable_position_of_Z ) // alert(" 3. probable_position_of_Z = "+probable_position_of_Z ); // alert(" 4. character_at_probable_position_of_Z = "+character_at_probable_position_of_Z ); // trying to find non-maatra position right to probable_position_of_Z . while( set_of_matras.match( character_at_probable_position_of_Z ) != null ) // while-04 { probable_position_of_Z = probable_position_of_Z + 1 ; character_at_probable_position_of_Z = modified_substring.charAt( probable_position_of_Z ) ; // alert(" 5. probable_position_of_Z = "+probable_position_of_Z ); // alert(" 6. character_at_probable_position_of_Z = "+character_at_probable_position_of_Z ); } // end of while-04 //************************************************************ // check if the next character is a halant //************************************************************ var right_to_position_of_Z = probable_position_of_Z + 1 ; // alert(" 7. right_to_position_of_Z = "+right_to_position_of_Z ); if (right_to_position_of_Z > 0) // if-03 { var character_right_to_position_of_Z = modified_substring.charAt( right_to_position_of_Z ) // alert(" 8. character_right_to_position_of_Z = "+character_right_to_position_of_Z ); while ("M ".match( character_right_to_position_of_Z ) != null ) // while-05 { // halant found, move to next character probable_position_of_Z = right_to_position_of_Z + 1 ; character_at_probable_position_of_Z = modified_substring.charAt( probable_position_of_Z ) ; // alert(" 9. probable_position_of_Z = "+probable_position_of_Z ); // alert("10. character_at_probable_position_of_Z = "+character_at_probable_position_of_Z ); right_to_position_of_Z = probable_position_of_Z + 1 ; character_right_to_position_of_Z = modified_substring.charAt( right_to_position_of_Z ) // alert("11. right_to_position_of_Z = "+right_to_position_of_Z ); // alert("12. character_right_to_position_of_Z = "+character_right_to_position_of_Z ); } // end of while-05 } // end of if-03 //************************************************************ string_to_be_replaced = modified_substring.substr ( position_of_half_R + 2,(probable_position_of_Z - position_of_half_R)-1) ; //************************************************************ // check if character_right_to_position_of_Z is a space // if (space.match(character_right_to_position_of_Z) != null) // { // string_to_be_replaced = string_to_be_replaced.substr(0,string_to_be_replaced.length - 1) // alert("13. string_to_be_replaced = "+string_to_be_replaced ); // alert("14. string_to_be_replaced.length ="+string_to_be_replaced.length); // } modified_substring = modified_substring.replace( "0 M " + string_to_be_replaced, string_to_be_replaced + "&" ) ; // alert("15. string_to_be_replaced = "+string_to_be_replaced ); // alert("16. modified_substring = "+modified_substring ); position_of_half_R = modified_substring.indexOf( "0 M " ) ; // alert("17. position_of_half_R = "+position_of_half_R ) } // end of while-03 //*********************************************************** modified_substring = modified_substring.substr ( 0 , modified_substring.length - 2 ) ; //substitute array_two elements in place of corresponding array_one elements for( input_symbol_idx = 0; input_symbol_idx < array_one_length; input_symbol_idx++ ) { idx = 0 ; // index of the symbol being searched for replacement while (idx != -1 ) //whie-00 { modified_substring = modified_substring.replace( array_one[ input_symbol_idx ] , array_two[input_symbol_idx] ) idx = modified_substring.indexOf( array_one[input_symbol_idx] ) } // end of while-00 loop } // end of for loop } // end of IF statement meant to supress processing of blank string. modified_substring = modified_substring.replace ( //g , "ef" ) modified_substring = modified_substring.replace ( /d &/g , "d&" ) modified_substring = modified_substring.replace ( /~Ne/g , "Ne" ) modified_substring = modified_substring.replace ( /~&n/g , "Nn" ) // modified_substring = modified_substring.replace ( /&e/g , "Ne" ) // modified_substring = modified_substring.replace ( /n&/g , "Nn" ) modified_substring = modified_substring.replace ( /&er/g , "er&" ) modified_substring = modified_substring.replace ( /&e/g , "e&" ) modified_substring = modified_substring.replace ( /e&/g , "e&" ) modified_substring = modified_substring.replace ( /^g/g , "" ) modified_substring = modified_substring.replace ( /^t/g , "" ) modified_substring = modified_substring.replace ( /&sb/g , "X" ) modified_substring = modified_substring.replace ( /&wb/g , "Z" ) modified_substring = modified_substring.replace ( /&/g , "&" ) modified_substring = modified_substring.replace ( /e&f/g , "&ef" ) modified_substring = modified_substring.replace ( /&b/g , "" ) modified_substring = modified_substring.replace ( /d([^ \,\;\.d \n\-\:])/g , "$1" ) modified_substring = modified_substring.replace ( /wb/g , "Q" ) modified_substring = modified_substring.replace ( /sb/g , "W" ) modified_substring = modified_substring.replace ( /rb/g , "R" ) //following to take care of pf, ka, ha etc having 'bakuli'. modified_substring = modified_substring.replace( /e([\&g])/g , "e$1" ) ; // following for converting J modified_substring = modified_substring.replace( /J /g , "es" ) ; // remove the space put before closing bracket ')' modified_substring = modified_substring.replace ( / \)/g , "\)" ) ; } // end of the function Replace_Symbols( ) } // end of convert_to_Prakash function </script> </head> <!-- ---------------------------------------------------------------------------------- body of the HTML starts here. one text box is provided each for input and output. --> <body> <form name="form1"><br> <b>APS-DV-PRAKASH font text-box </b><br/> <HTML><BODY bgColor="#CCFF99"><CENTER> <textarea name="TextToConvert" id="legacy_text" cols="92" rows="6"></textarea> <br> <div align="middle"> <CENTER><input type="button" name="converter" id="converter" value=" Convert to Unicode >> " onClick="convert_to_unicode();" accesskey="c" title="6 I 0 M    alt+c"> </div> <br> <b><CENTER>Unicode text-box</b> <br/> <textarea name="ConvertedText" id="unicode_text" cols="92" rows="5"></textarea> <br /> <div align="middle"> <input type="button" id="converter" name="converter" value=" Convert to APS-DV-PRAKASH >> " onClick="convert_to_Prakash();" accesskey="c" </div> </form> </body> </html>