<html><head> <meta http-equiv="content-type" content="text/html; charset=UTF-16LE"></head><body>0 K . ( 9 ? ( M & @ 8 G / B ( ?  K ! * 0 ? 5 0 M $ ? $ M 0 (14-5-2009 21:03) <br> Last update: 17-5-2009 09:50 <script type="text/javascript"> function convert_to_unicode() { var array_one = new Array( " a?","th","uai","tx","iryo","rryo"," rhai"," rme"," rle"," u","r", " ","re","u","erai","bhi "," xp","" xre","" ex","rae","r ","" hex", "ix","ihx","x","hx", "" ix","" ihx","" x","" hx", "k","tr", "kh","k","gh","g",":n", "ch","c","jh","j","", "h","","h","x","", "th","t","dh","d","n", "ph","p","bh","b","m", "y", ".r", ".l","l","v","","","s","h","M ir","ir","r", "M ","M a6","a6","6","M ee", "" 9 ","" ! ","" 9 M ! M ", ""  ",""  ! M ","M ! M ",""  ","" ", "M ","M ","M ai","M au","M a","M ","M i","M ","M u","M .R.R","M x","M e","M o","","","", "u","", "ai", "au", "a", "ii", "i", "", "u", ".R.R", "x", "e", "o", "/", " ","6 ","\ M ","] M ","0 M & C ","8 G 35","   ") var array_two = new Array( "  ","l"," ","2 B ","iyo","ryo"," 9 H  "," . G  "," 2 G  ","  ","s", " ","  "," ","  ","- @ "," 7 M ","\ K  ","\ G "," "," ","] G ", "\ ? ","] ? ","\ M ","] M ", "\ ? ","] ? ","\ M ","] M ", " M 7 M ","$ M 0 M ", " M "," M "," M "," M "," M ", " M "," M "," M "," M "," M ", " M "," M ","" M ","! M ","# M ", "% M ","$ M ","' M ","& M ","( M ", "+ M ","* M ","- M ",", M ",". M ", "/ M ", ".R","3 M ","2 M ","5 M ","6 M ","7 M ","8 M ","9 M ","? 0 M "," ","0 M ", "# ","L "," ","L ","H ", "" ","\ ","] ","! ","\ G ","C ","\ G ","! M ", "M ","> ", "H ", "L ", "","@ ","? ","B ","A ","D ","C ","G ","K ",' ',' '," ", " "," "," "," "," "," "," "," "," ","` "," "," "," ","d ", "0 M & C ","9 H ","\ ","] "," ","8 G & G ","  ") var array_one_length = array_one.length ; if ( (document.getElementById("text_or_html")).selectedIndex == 0 ) // if the input is plain text { document.getElementById("unicode_text").value = "You have chosen SIMPLE TEXT in Roman to convert into Devanagari Unicode." ; var text_size = document.getElementById("legacy_text").value.length ; var processed_text = '' ; //blank var sthiti1 = 0 ; var sthiti2 = 0 ; var chale_chalo = 1 ; while ( chale_chalo == 1 ) { sthiti1 = sthiti2 ; if ( sthiti2 < ( text_size - 10000 ) ) { sthiti2 += 10000 ; while (document.getElementById("legacy_text").value.charAt ( sthiti2 ) != ' ') {sthiti2--;} } else { sthiti2 = text_size ; chale_chalo = 0 } var modified_substring = document.getElementById("legacy_text").value.substring ( sthiti1, sthiti2 ) ; // alert(" sthiti 1 = "+sthiti1); alert(" sthit 2 = "+sthiti2) Replace_Symbols( ) ; processed_text += modified_substring ; 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++ ) { 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] ) //******************************************************** //if (input_symbol_idx == 2) then //{ alert(" array_one[ input_symbol_idx ] = "+array_one[ input_symbol_idx ] ); // alert(" array_two[ input_symbol_idx ] = "+array_two[ input_symbol_idx ] ); // alert(" modified_substring = "+modified_substring ); //} //******************************************************** 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. } // end of the function Replace_Symbols } // end of legacy_to_unicode function </script> <!-- ---------------------------------------------------------------------------------- body of the HTML starts here. one text box is provided each for input and output. --> <form name="form1"> Paste the Sanskrit text in Roman in the box below : <br><br> <textarea name="TextToConvert" id="legacy_text" cols="80" rows="7"></textarea> <br><br> The input given in the above box is : <div> <select id="text_or_html"> <option>Plain TEXT</option> <option>HTML TEXT</option> </select> </div> <div align="middle"> <input id="converter" name="converter" value=" Convert to Unicode &gt;&gt; " onclick="convert_to_unicode();" accesskey="c" title="6 I 0 M    alt+c" type="button"> </div> <br> This is Devanagari Unicode equivalent of the above Roman Text: <br><br> <textarea name="ConvertedText" id="unicode_text" cols="80" rows="13"></textarea> <br> </form> </body></html>