Skip to main content

KrutiDev To Unicode Conversion

http://wrd.bih.nic.in/font_KtoU.htm

___________________________________


<html>
<head>
<title>KrutiDev <=> Unicode Conversion</title>
</title>
<link rel="stylesheet" href="style.css">
     
<script src='script.js'></script>
</head>
<!--       body of the HTML starts here. one text box is provided each for input and output.
-->
<body bgcolor='#99CCFF'>
<P style='text-align:center; font-family: Arial, Helvetica, sans-serif; font-size: 14pt; font-weight:bold; background-color: #FF6600; color: #FFFFFF'>
Conversion between Krutidev-010 and Unicode क्रुतिदेव-०१० और यूनिकोड के बीच रूपांतरण
</P>
<form name="form1">
<p style='font-size:10pt'>क्रुतिदेव-०१० (Kruti Dev 010) फॉन्ट में टंकिट टेक्स्ट को "क्रुतिदेव-०१०" नामक टेक्स्ट बॉक्स में टाईप या पेस्ट करें तथा इसे यूनिकोड में रूपांतरित करने के लिए अधोमुख तीर वाले बटन को दबाएँ। इसी प्रकार यूनिकोड फॉन्ट में टंकिट टेक्स्ट को "यूनिकोड" नामक टेक्स्ट बॉक्स में टाईप या पेस्ट करें तथा इसे क्रुतिदेव-०१० में रूपांतरित करने के लिए उर्ध्वमुखी तीर वाले बटन को दबाएँ।
</font>
<br>
<hr>
<table>
<tr bgcolor='#FF9933'>
<td align='center'>
&#2325;&#2381;&#2352;&#2369;&#2340;&#2367;&#2342;&#2375;&#2357;-&#2406;&#2407;&#2406;</td>
<td align='center'>
<textarea name='TextToConvert' id='legacy_text' cols='100' rows='10' style='font-family:"Kruti Dev 010";font-size:18px'></textarea>
</td>
</tr>
<tr bgcolor='#FFFFFF'>
<td align='center'>
&nbsp; 
</td>
<td align='center'>
<input  type="button" name="converter" id="converter" style='background-color:#000000;font-size:18px;font-weight:bold;text-align:center;color:#ffffff' value=" &#8659; " onClick="convert_to_unicode();" accesskey="c" title="&#2325;&#2381;&#2352;&#2369;&#2340;&#2367;&#2342;&#2375;&#2357; &#2360;&#2375; &#2351;&#2370;&#2344;&#2367;&#2325;&#2379;&#2337;">
&nbsp;&nbsp;&nbsp;
<input  type="button" id="converter" name="converter" style='background-color:#000000;font-size:18px;font-weight:bold;text-align:center;color:#ffffff' value=" &#8657; " onClick="Convert_to_Kritidev_010();" accesskey="c" title="&#2351;&#2370;&#2344;&#2367;&#2325;&#2379;&#2337; &#2360;&#2375; &#2325;&#2381;&#2352;&#2369;&#2340;&#2367;&#2342;&#2375;&#2357;">
</td>
</tr>
<tr bgcolor='#33CC33'>
<td align='center'>
&#2351;&#2370;&#2344;&#2367;&#2325;&#2379;&#2337;</td>
<td align='center'>
<textarea name='ConvertedText' id='unicode_text' cols='88' rows='11' style='font-size:14px'></textarea>
</td>
</tr>
</table>
</form>
</body>
</html>
--------------------- JS
function convert_to_unicode()
{

var array_one = new Array(
// "(",")",
"ñ","Q+Z","sas","aa",")Z","ZZ","‘","’","“","”",

"å",  "ƒ",  "„",   "…",   "†",   "‡",   "ˆ",   "‰",   "Š",   "‹",

"¶+",   "d+", "[+k","[+", "x+",  "T+",  "t+", "M+", "<+", "Q+", ";+", "j+", "u+",
"Ùk", "Ù", "ä", "–", "—","é","™","=kk","f=k", 

"à",   "á",    "â",   "ã",   "ºz",  "º",   "í", "{k", "{", "=",  "«", 
"Nî",   "Vî",    "Bî",   "Mî",   "<î", "|", "K", "}",
"J",   "Vª",   "Mª",  "<ªª",  "Nª",   "Ø",  "Ý", "nzZ",  "æ", "ç", "Á", "xz", "#", ":",

"v‚","vks",  "vkS",  "vk",    "v",  "b±", "Ã",  "bZ",  "b",  "m",  "Å",  ",s",  ",",   "_",

"ô",  "d", "Dk", "D", "[k", "[", "x","Xk", "X", "Ä", "?k", "?",   "³",
"pkS",  "p", "Pk", "P",  "N",  "t", "Tk", "T",  ">", "÷", "¥",

"ê",  "ë",   "V",  "B",   "ì",   "ï", "M+", "<+", "M",  "<", ".k", ".",   
"r",  "Rk", "R",   "Fk", "F",  ")", "n", "/k", "èk",  "/", "Ë", "è", "u", "Uk", "U", 

"i",  "Ik", "I",   "Q",    "¶",  "c", "Ck",  "C",  "Hk",  "H", "e", "Ek",  "E",
";",  "¸",   "j",    "y", "Yk",  "Y",  "G",  "o", "Ok", "O",
"'k", "'",   "\"k",  "\"",  "l", "Lk",  "L",   "g",

"È", "z",
"Ì", "Í", "Î",  "Ï",  "Ñ",  "Ò",  "Ó",  "Ô",   "Ö",  "Ø",  "Ù","Ük", "Ü",

"‚",    "ks",   "kS",   "k",  "h",    "q",   "w",   "`",    "s",    "S",
"a",    "¡",    "%",     "W",  "•", "·", "∙", "·", "~j",  "~", "\\","+"," ः",
"^", "*",  "Þ", "ß", "(", "¼", "½", "¿", "À", "¾", "A", "-", "&", "&", "Œ", "]","~ ","@")

var array_two = new Array(
//"¼","½",
"॰","QZ+","sa","a","र्द्ध","Z","\"","\"","'","'",

"०",  "१",  "२",  "३",     "४",   "५",  "६",   "७",   "८",   "९", 

"फ़्",  "क़",  "ख़", "ख़्",  "ग़", "ज़्", "ज़",  "ड़",  "ढ़",   "फ़",  "य़",  "ऱ",  "ऩ",    // one-byte nukta varNas
"त्त", "त्त्", "क्त",  "दृ",  "कृ","न्न","न्न्","=k","f=",

"ह्न",  "ह्य",  "हृ",  "ह्म",  "ह्र",  "ह्",   "द्द",  "क्ष", "क्ष्", "त्र", "त्र्",
"छ्य",  "ट्य",  "ठ्य",  "ड्य",  "ढ्य", "द्य", "ज्ञ", "द्व",
"श्र",  "ट्र",    "ड्र",    "ढ्र",    "छ्र",   "क्र",  "फ्र", "र्द्र",  "द्र",   "प्र", "प्र",  "ग्र", "रु",  "रू",

"ऑ",   "ओ",  "औ",  "आ",   "अ", "ईं", "ई",  "ई",   "इ",  "उ",   "ऊ",  "ऐ",  "ए", "ऋ",

"क्क", "क", "क", "क्", "ख", "ख्", "ग", "ग", "ग्", "घ", "घ", "घ्", "ङ",
"चै",  "च", "च", "च्", "छ", "ज", "ज", "ज्",  "झ",  "झ्", "ञ",

"ट्ट",   "ट्ठ",   "ट",   "ठ",   "ड्ड",   "ड्ढ",  "ड़", "ढ़", "ड",   "ढ", "ण", "ण्", 
"त", "त", "त्", "थ", "थ्",  "द्ध",  "द", "ध", "ध", "ध्", "ध्", "ध्", "न", "न", "न्",   

"प", "प", "प्",  "फ", "फ्",  "ब", "ब", "ब्",  "भ", "भ्",  "म",  "म", "म्", 
"य", "य्",  "र", "ल", "ल", "ल्",  "ळ",  "व", "व", "व्", 
"श", "श्",  "ष", "ष्", "स", "स", "स्", "ह",

"ीं", "्र",   
"द्द", "ट्ट","ट्ठ","ड्ड","कृ","भ","्य","ड्ढ","झ्","क्र","त्त्","श","श्",

"ॉ",  "ो",   "ौ",   "ा",   "ी",   "ु",   "ू",   "ृ",   "े",   "ै",
"ं",   "ँ",   "ः",   "ॅ",  "ऽ", "ऽ", "ऽ", "ऽ", "्र",  "्", "?", "़",":",
"‘",   "’",   "“",   "”",  ";",  "(",    ")",   "{",    "}",   "=", "।", ".", "-",  "µ", "॰", ",","् ","/")

//Corrections for Spelling mistakes (see above under the first Array):
// "sas","aa","ZZ","=kk","f=k",
//
// The following two characters are to be replaced through proper checking of locations:
// "Z" )
// "र्" (reph)

// "f" )
// "ि" 


var array_one_length = array_one.length ;

var modified_substring = document.getElementById("legacy_text").value  ;

//****************************************************************************************
//  Break the long text into small bunches of max. max_text_size  characters each.
//****************************************************************************************
    var text_size = document.getElementById("legacy_text").value.length ;

    var processed_text = '' ;  //blank

    var sthiti1 = 0 ;  var sthiti2 = 0 ;  var chale_chalo = 1 ;

    var max_text_size = 6000;

    while ( chale_chalo == 1 )
    {
     sthiti1 = sthiti2 ;

     if ( sthiti2 < ( text_size - max_text_size ) ) 
     {
      sthiti2 +=  max_text_size ;
      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 )  ;

    Replace_Symbols( ) ;

    processed_text += modified_substring ;

//****************************************************************************************
//  Breaking part code over
//****************************************************************************************
//  processed_text = processed_text.replace( /mangal/g , "Krutidev010" ) ; 

    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] )
idx = modified_substring.indexOf( array_one[input_symbol_idx] )

} // end of while-00 loop
} // end of for loop

//**********************************************************************************
// Code for Replacing five Special glyphs
//**********************************************************************************

//**********************************************************************************
// Code for Glyph1 : ± (reph+anusvAr)
//**********************************************************************************
   modified_substring = modified_substring.replace( /±/g , "Zं" ) ; // at some places  ì  is  used eg  in "कर्कंधु,पूर्णांक".
//
//**********************************************************************************
// Glyp2: Æ
// code for replacing "f" with "ि" and correcting its position too. (moving it one position forward)
//**********************************************************************************

modified_substring = modified_substring.replace( /Æ/g , "र्f" ) ;  // at some places  Æ  is  used eg  in "धार्मिक".

var position_of_i = modified_substring.indexOf( "f" )

while ( position_of_i != -1 )  //while-02
{
var charecter_next_to_i = modified_substring.charAt( position_of_i + 1 )
var charecter_to_be_replaced = "f" + charecter_next_to_i
modified_substring = modified_substring.replace( charecter_to_be_replaced , charecter_next_to_i + "ि" )
position_of_i = modified_substring.search( /f/ , position_of_i + 1 ) // search for i ahead of the current position.

} // end of while-02 loop

//**********************************************************************************
// Glyph3 & Glyph4: Ç  É
// code for replacing "fa" with "िं"  and correcting its position too.(moving it two positions forward)
//**********************************************************************************

modified_substring = modified_substring.replace( /Ç/g , "fa" ) ; // at some places  Ç  is  used eg  in "किंकर".
modified_substring = modified_substring.replace( /É/g , "र्fa" ) ; // at some places  É  is  used eg  in "शर्मिंदा"

var position_of_i = modified_substring.indexOf( "fa" )

while ( position_of_i != -1 )  //while-02
{
var charecter_next_to_ip2 = modified_substring.charAt( position_of_i + 2 )
var charecter_to_be_replaced = "fa" + charecter_next_to_ip2
modified_substring = modified_substring.replace( charecter_to_be_replaced , charecter_next_to_ip2 + "िं" )
position_of_i = modified_substring.search( /fa/ , position_of_i + 2 ) // search for i ahead of the current position.

} // end of while-02 loop

//**********************************************************************************
// Glyph5: Ê
// code for replacing "h" with "ी"  and correcting its position too.(moving it one positions forward)
//**********************************************************************************

modified_substring = modified_substring.replace( /Ê/g , "ीZ" ) ; // at some places  Ê  is  used eg  in "किंकर".


/*
var position_of_i = modified_substring.indexOf( "h" )

while ( position_of_i != -1 )  //while-02
{
var charecter_next_to_i = modified_substring.charAt( position_of_i + 1 )
var charecter_to_be_replaced = "h" + charecter_next_to_i
modified_substring = modified_substring.replace( charecter_to_be_replaced , charecter_next_to_i + "ी" )
position_of_i = modified_substring.search( /h/ , 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( "ि्" )

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 = "ि्" + consonent_next_to_wrong_ee
modified_substring = modified_substring.replace( charecter_to_be_replaced , "्" + consonent_next_to_wrong_ee + "ि" )
position_of_wrong_ee = modified_substring.search( /ि्/ , position_of_wrong_ee + 2 ) // search for 'wrong ee' ahead of the current position.

} // end of while-03 loop

//**************************************
//
//**************************************
//   alert(modified_substring);
//**************************************

// Eliminating reph "Z" and putting 'half - r' at proper position for this.
set_of_matras = "अ आ इ ई उ ऊ ए ऐ ओ औ ा ि ी ु ू ृ े ै ो ौ ं : ँ ॅ"
var position_of_R = modified_substring.indexOf( "Z" )

while ( position_of_R > 0 )  // while-04
{
probable_position_of_half_r = position_of_R - 1 ;
var charecter_at_probable_position_of_half_r = modified_substring.charAt( probable_position_of_half_r )


// trying to find non-maatra position left to current O (ie, half -r).

while ( set_of_matras.match( charecter_at_probable_position_of_half_r ) != null )  // while-05

{
probable_position_of_half_r = probable_position_of_half_r - 1 ;
charecter_at_probable_position_of_half_r = modified_substring.charAt( probable_position_of_half_r ) ;

} // end of while-05


charecter_to_be_replaced = modified_substring.substr ( probable_position_of_half_r , ( position_of_R - probable_position_of_half_r ) ) ;
new_replacement_string = "र्" + charecter_to_be_replaced ;
charecter_to_be_replaced = charecter_to_be_replaced + "Z" ;
modified_substring = modified_substring.replace( charecter_to_be_replaced , new_replacement_string ) ;
position_of_R = modified_substring.indexOf( "Z" ) ;

} // end of while-04

} // end of IF  statement  meant to  supress processing of  blank  string.

//**************************************
//   alert(modified_substring);
//**************************************


} // end of the function  Replace_Symbols


} // end of Kritidev_to_unicode function







function Convert_to_Kritidev_010()
{

var array_one = new Array(
// ignore all nuktas except in ड़ and ढ़
"‘",   "’",   "“",   "”",   "(",    ")",   "{",    "}",   "=", "।",  "?",  "-",  "µ", "॰", ",", ".", "् ",
"०",  "१",  "२",  "३",     "४",   "५",  "६",   "७",   "८",   "९", "x",

"फ़्",  "क़",  "ख़",  "ग़", "ज़्", "ज़",  "ड़",  "ढ़",   "फ़",  "य़",  "ऱ",  "ऩ",    // one-byte nukta varNas
"त्त्",   "त्त",     "क्त",  "दृ",  "कृ",

"ह्न",  "ह्य",  "हृ",  "ह्म",  "ह्र",  "ह्",   "द्द",  "क्ष्", "क्ष", "त्र्", "त्र","ज्ञ",
"छ्य",  "ट्य",  "ठ्य",  "ड्य",  "ढ्य", "द्य","द्व",
"श्र",  "ट्र",    "ड्र",    "ढ्र",    "छ्र",   "क्र",  "फ्र",  "द्र",   "प्र",   "ग्र", "रु",  "रू",
"्र",

"ओ",  "औ",  "आ",   "अ",   "ई",   "इ",  "उ",   "ऊ",  "ऐ",  "ए", "ऋ",

"क्",  "क",  "क्क",  "ख्",   "ख",    "ग्",   "ग",  "घ्",  "घ",    "ङ",
"चै",   "च्",   "च",   "छ",  "ज्", "ज",   "झ्",  "झ",   "ञ",

"ट्ट",   "ट्ठ",   "ट",   "ठ",   "ड्ड",   "ड्ढ",  "ड",   "ढ",  "ण्", "ण", 
"त्",  "त",  "थ्", "थ",  "द्ध",  "द", "ध्", "ध",  "न्",  "न", 

"प्",  "प",  "फ्", "फ",  "ब्",  "ब", "भ्",  "भ",  "म्",  "म",
"य्",  "य",  "र",  "ल्", "ल",  "ळ",  "व्",  "व",
"श्", "श",  "ष्", "ष",  "स्",   "स",   "ह",   

"ऑ",   "ॉ",  "ो",   "ौ",   "ा",   "ी",   "ु",   "ू",   "ृ",   "े",   "ै",
"ं",   "ँ",   "ः",   "ॅ",    "ऽ",  "् ", "्" )

var array_two = new Array(

"^", "*",  "Þ", "ß", "¼", "½", "¿", "À", "¾", "A", "\\", "&", "&", "Œ", "]","-","~ ",
"å",  "ƒ",  "„",   "…",   "†",   "‡",   "ˆ",   "‰",   "Š",   "‹","Û",

"¶",   "d",    "[k",  "x",  "T",  "t",   "M+", "<+", "Q",  ";",    "j",   "u",
"Ù",   "Ùk",   "ä",    "–",   "—",     

"à",   "á",    "â",   "ã",   "ºz",  "º",   "í", "{", "{k",  "«", "=","K",
"Nî",   "Vî",    "Bî",   "Mî",   "<î", "|","}",
"J",   "Vª",   "Mª",  "<ªª",  "Nª",   "Ø",  "Ý",   "æ", "ç", "xz", "#", ":",
"z",

"vks",  "vkS",  "vk",    "v",   "bZ",  "b",  "m",  "Å",  ",s",  ",",   "_",

"D",  "d",    "ô",     "[",     "[k",    "X",   "x",  "?",    "?k",   "³",
"pkS",  "P",    "p",  "N",   "T",    "t",   "÷",  ">",   "¥",

"ê",      "ë",      "V",  "B",   "ì",       "ï",     "M",  "<",  ".", ".k", 
"R",  "r",   "F", "Fk",  ")",    "n", "/",  "/k",  "U", "u", 

"I",  "i",   "¶", "Q",   "C",  "c",  "H",  "Hk", "E",   "e",
"¸",   ";",    "j",  "Y",   "y",  "G",  "O",  "o",
"'", "'k",  "\"", "\"k", "L",   "l",   "g",     

"v‚",    "‚",    "ks",   "kS",   "k",     "h",    "q",   "w",   "`",    "s",    "S",
"a",    "¡",    "%",     "W",   "·",   "~ ", "~")   // "~j"
 
//************************************************************
//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:

// "र्" (reph)
// "Z" )

// "ि" 
// "f" )


var array_one_length = array_one.length ;

var modified_substring = document.getElementById("unicode_text").value  ;

//****************************************************************************************
//  Break the long text into small bunches of max. max_text_size  characters each.
//****************************************************************************************
    var text_size = document.getElementById("unicode_text").value.length ;

    var processed_text = '' ;  //blank

    var sthiti1 = 0 ;  var sthiti2 = 0 ;  var chale_chalo = 1 ;

    var max_text_size = 6000;

   //************************************************************
   // var max_text_size = chunksize;
   // alert(max_text_size);
   //************************************************************

    while ( chale_chalo == 1 )
    {
     sthiti1 = sthiti2 ;

     if ( sthiti2 < ( text_size - max_text_size ) ) 
     {
      sthiti2 +=  max_text_size ;
      while (document.getElementById("unicode_text").value.charAt ( sthiti2 ) != ' ') {sthiti2--;}
     }
     else  { sthiti2 = text_size  ;  chale_chalo = 0 }

     var modified_substring = document.getElementById("unicode_text").value.substring ( sthiti1, sthiti2 )  ;

    Replace_Symbols( ) ;

    processed_text += modified_substring ;

//****************************************************************************************
//  Breaking part code over
//****************************************************************************************
//  processed_text = processed_text.replace( /mangal/g , "Krutidev010" ) ; 

    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 != "" ) 
       {

// first replace the two-byte nukta_varNa with corresponding one-byte nukta varNas.

modified_substring = modified_substring.replace ( /क़/ , "क़" )  ;
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 ( /फ़/g , "फ़" )  ;
modified_substring = modified_substring.replace ( /य़/g , "य़" )  ;
modified_substring = modified_substring.replace ( /ऱ/g , "ऱ" )  ;


        // code for replacing "ि" (chhotee ee kii maatraa) with "f"  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 + "ि" ,  "f" + character_left_to_f )  ;

            position_of_f = position_of_f - 1  ;

            while (( modified_substring.charAt( position_of_f - 1 ) == "्" )  &  ( position_of_f != 0  ) )
               {
                var string_to_be_replaced = modified_substring.charAt( position_of_f - 2 ) + "्"  ;
                  modified_substring = modified_substring.replace( string_to_be_replaced + "f", "f" + 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( /fर्/g , "£"  )  ;
   //************************************************************   
        // Eliminating "र्" and putting  Z  at proper position for this.

       set_of_matras = "ािीुूृेैोौं:ँॅ"

modified_substring += '  '    ;  // add two spaces after the string to avoid UNDEFINED char in the following code.

       var position_of_half_R = modified_substring.indexOf( "र्" ) ;
        while ( position_of_half_R > 0  )  // while-04
           {
            // "र्"  is two bytes long
            var probable_position_of_Z = position_of_half_R + 2   ; 

            var character_right_to_probable_position_of_Z = modified_substring.charAt( probable_position_of_Z + 1 )

            // trying to find non-maatra position right to probable_position_of_Z .

            while ( set_of_matras.indexOf( character_right_to_probable_position_of_Z ) != -1 ) 
               {
                probable_position_of_Z = probable_position_of_Z + 1 ;
                character_right_to_probable_position_of_Z = modified_substring.charAt( probable_position_of_Z + 1 ) ;
               } // end of while-05

            string_to_be_replaced = modified_substring.substr ( position_of_half_R + 2 , ( probable_position_of_Z - position_of_half_R - 1 ))  ;
            modified_substring = modified_substring.replace( "र्" + string_to_be_replaced  ,  string_to_be_replaced + "Z" ) ;
            position_of_half_R = modified_substring.indexOf( "र्" ) ;
           } // end of while-04


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.

    } // end of the function  Replace_Symbols( )

  } // end of Convert_Unicode_to_Krutidev010 function
-------- CSS

.Header {  font-family: Arial, Helvetica, sans-serif; font-size: 14pt; background-color: #FF6600; color: #FFFFFF}
.ColHeader {  font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FFFFFF; background-color: #666666; font-weight: bold}
.OddRow {  font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000; background-color: #E4E4E4}
.EvenRow { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000; background-color: #B9B9B9}
.smalllist {  font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: normal; color: #000000; background-color: #ffcc33}
.h1 {  font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-style: normal; font-weight: bold; font-variant: normal; color: #CC6600; line-height: 20pt}
.b1 {  font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-style: normal; font-weight: normal; color: #0000FF; text-align: justify}
.Header1 { font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #660000; font-weight: bold; text-transform: none; font-variant: normal; font-style: normal}
.Items {COLOR: #ffffff; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold; TEXT-DECORATION: none}
.Items1 {  font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold; color: #000000; background-color: #ffcc33}
.Items2 {  font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #000000; background-color: #FFFFFF}
.BottomMenu {  font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000}
.Header2 { font-family: Arial, Helvetica, sans-serif; font-size: 12pt; background-color: #66CCFF; color: #FF3300; font-weight: bold; text-transform: none; font-variant: normal; font-style: normal }
.ColHeader1 { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #FFFFFF; background-color: #999999; font-weight: normal}
.Items3 { COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold; TEXT-DECORATION: none }
.bodytext {  font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000; text-align: justify}
.h2 { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; font-weight: bold; font-variant: normal; background-color: #FFCC99; color: #003333}
.bodytext1 { font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #FF3333; text-align: justify }
.MenuTable {  font-family: Arial, Helvetica, sans-serif; font-size: 14pt; color: #0080FF; filter: BlendTrans(Duration=10); border-color: #008000 black black}
.MenuTable1 { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #0080FF;  background-color: #CCFFCC }
a.stl1:link{text-decoration:underline;color:#0000FF;; font-family: Arial, Helvetica, sans-serif; font-size: 12pt}
a.stl1:visited{color:#0000FF;; font-family: Arial, Helvetica, sans-serif; font-size: 12pt}
a.stl1:hover{text-decoration:underline;color:red;}

a.stl2:link{text-decoration:none;color:#000000;; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; line-height: 14pt; font-weight: bold}
a.stl2:visited{text-decoration:none;color:#000000;; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14pt}
a.stl2:hover{text-decoration:none;color:#FF0033;}

a.stl3:link{text-decoration:none;color:#0080FF;}
a.stl3:visited{text-decoration:none;color:#0080FF;}
a.stl3:hover{text-decoration:none;color:#FF3333;; font-family: Arial, Helvetica, sans-serif; font-size: 12pt; line-height: 14pt}

a.stl4:link{color:#3333ff;; font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-style: normal}
a.stl4:visited{color:#3333ff;; font-family: Arial, Helvetica, sans-serif; font-size: 9pt}
a.stl4:hover{text-decoration:underline overline;color:#3333FF;; background-color: #FFFFCC;}
.Header1Hindi { font-family: "Kruti Dev 010"; font-size: 18pt; background-color: #FFffff; color: #FF3333; font-weight: bold; text-transform: none; font-variant: normal; font-style: normal }
.h1Hindi { font-family: "Kruti Dev 010"; font-size: 14pt; font-style: normal; font-weight: bold; font-variant: normal; background-color: #FFCCCC; color: #CC6600; line-height: 20pt }
.bodytextHindi { font-family: "Kruti Dev 010"; font-size: 14pt; color: #000000; text-align: left; font-style: normal; text-decoration: none}
.stl1hindi { text-decoration:none; ; font-family: "Kruti Dev 010", "Kruti Dev 040"; font-size: 16pt}
.ColHeader2 { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000; background-color: #FFCC99; font-weight: bold }
.Row { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000; background-color: #FFFFCC}
.bodytext2 { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #660066}
a.stl5:link{text-decoration:none;color:#3333FF;}
a.stl5:visited{text-decoration:none;color:#3333FF;}
a.stl5:hover{text-decoration:none;color:red;}
.ColHeader2Hindi { font-family: "Kruti Dev 010", "Kruti Dev 040"; font-size: 14pt; color: #000000; background-color: #FFCC99; font-weight: bold }
.MenuTableHindi { font-family: "Kruti Dev 010", "Kruti Dev 040"; font-size: 14pt; color: #3333FF; filter: BlendTrans(Duration=10); border-color: #008000 black black; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: #CCFFCC ; font-weight: bold}
.MenuTable2 { font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #0080FF; background-color: #CCFFCC ; font-weight: bold}
.RowHindi { font-family: "Kruti Dev 010", "Kruti Dev 040"; font-size: 12pt; color: #000000; background-color: #FFFFCC }
body {  margin-top: 1px; margin-left: 6px}

Comments

Popular posts from this blog

SETUP REST API IN CI

1. Create Rest_controller.php inside controllers and paste code: <?php defined('BASEPATH') OR exit('No direct script access allowed'); require APPPATH . '/libraries/API_Controller.php'; class Rest_controller extends API_Controller { public function __construct() { parent::__construct(); } public function index() { $this->api_return(             [ 'status' => true,                'result' => "Welcome to Testservices."             ],         200); } } ?> 2. Create api.php inside config and paste code : <?php defined('BASEPATH') OR exit('No direct script access allowed'); /**  * API Key Header Name  */ $config['api_key_header_name'] = 'X-API-KEY'; /**  * API Key GET Request Parameter Name  */ $config['api_key_get_name'] = 'key'; /**  * API Key POST Request Parameter Name ...

NGrok Setup

 https://dashboard.ngrok.com/get-started/setup 1. Unzip to install On Linux or Mac OS X you can unzip ngrok from a terminal with the following command. On Windows, just double click ngrok.zip to extract it. unzip /path/to/ngrok.zip 2. Connect your account Running this command will add your authtoken to the default ngrok.yml configuration file. This will grant you access to more features and longer session times. Running tunnels will be listed on the endpoints page of the dashboard. ngrok config add-authtoken 1woFn9zVqcI4VeGuSIiN2VtmnPa_ZXuAuF1AAPkqApr7WVsQ 3. Fire it up Read the documentation on how to use ngrok. Try it out by running it from the command line: ngrok help To start a HTTP tunnel forwarding to your local port 80, run this next: ngrok http 80

API ( service ) Image or Video Upload

## SAVE  VIDEO public function uploadmedia() { $target_path = "assets/uploads/"; $target_path = $target_path . basename($_FILES['file']['name']); if(move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) { $this->api_return( [ 'status' => true,    'result' => 'uploaded success' ], 200); } else{ $this->api_return( [ 'status' => false,    'result' => 'failed' ], 20); } } ## SAVE FILE IMAGE OR VIDEO public function savefile() { $filetype = $_FILES['file']['type']; if (strpos($filetype, 'image') !== false) { $type = 'image'; } if (strpos($filetype, 'video') !== false) { $type = 'video'; }         $filename = trim($_FILES['file']['name']); // $userid = trim($this->input->get('userid'));...