-
Notifications
You must be signed in to change notification settings - Fork 6
/
ORTT-Sarala - Unicode Converter.htm
323 lines (283 loc) · 9.31 KB
/
ORTT-Sarala - Unicode Converter.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="author" content="Manoj Sahukar">
<meta name=Description content= OR-TT Sarala - Unicode Converter>
<meta name=Author1 content=Manoj Sahukar>
<meta name=Author2 content=Subhasish Panigrahi>
<title>OR-TT Sarala - Unicode Converter</title>
<style>
</style>
<script type="text/javascript">
function convert_to_unicode()
{
var text_array = new Array(
"ÞÔ", "ÔÞ",
"¼¼Ð" , " ।" ,
"þ" , "" ,
"Æ" , "" ,
"¼" , "" ,
"¤" , "" ,
"¥" , "" ,
"1" , "୧" ,
"2" , "୨" ,
"3" , "୩" ,
"4" , "୪" ,
"5" , "୫" ,
"6" , "୬" ,
"7" , "୭" ,
"8" , "୮" ,
"9" , "୯" ,
"0" , "୦" ,
"%" , "ଞ୍ଝ" ,
"+" , "ଙ୍ଘ" ,
"<" , "ଙ୍ଖ" ,
">" , "ମ୍ଫ" ,
"o" , "ଚ୍ଛ" ,
"p" , "ଟ୍ଟ" ,
"z" , "ବ୍ବ" ,
"{" , "ଶ୍ଥ" ,
"}" , "ଞ୍ଛ" ,
"|" , "ଓଁ" ,
"~" , "ଦ୍ଦ" ,
"Æ" , "କ୍ଟ" ,
"`ù" , "ତ୍ପ" ,
"‘" , "ଗ୍ଧ" ,
"’" , "ଗ୍ଦ" ,
"“" , "ପ୍ପ" ,
"”" , "ଡ୍ଗ" ,
"•" , "ବ୍ଧ" ,
"–" , "ଳ୍କ" ,
"—" , "ତ୍ସ" ,
"˜" , "୍ଳ" ,
"™" , "ର୍ଁ" ,
"š" , "୍ୱ" ,
"›" , "୍ମ" ,
"¡" , "ଭ୍ଭ" ,
"£" , "କ୍କ" ,
"¬" , "ଣ୍ଢ" ,
"" , "ମ୍ପ" ,
"®" , "ମ୍ମ" ,
"°" , "ଳ୍କ" ,
"±" , "ସ୍ତ୍ର" ,
"´" , "ଷ୍କ" ,
"µ" , "କ୍ସ" ,
"¶" , "ଣ୍ଠ" ,
"·" , "ସ୍ଖ" ,
"»" , "ଷ୍ଣ" ,
"¿" , "ପ୍ପ" ,
"Â" , "ଦ୍ଗ" ,
"Ä" , "କ୍ଷ୍ଣ" ,
"Å" , "ଡ୍ଡ" ,
"Ç" , "ଳ୍ଫ" ,
"È" , "ଷ୍ଫ" ,
"É" , "ସ୍ଫ" ,
"Ì" , "ୃ" ,
"Í" , "୍ର" ,
"Î" , "ଽ" ,
"Ï" , "଼" ,
"T" , "ଝ" ,
"b" , "ଭ" ,
"e" , "ର" ,
"m" , "ଲ" ,
"k" , "ହ" ,
"r" , "ତ୍ତ" ,
"L" , "କ" ,
"M" , "ଖ" ,
"N" , "ଗ" ,
"O" , "ଘ" ,
"P" , "ଙ" ,
"Q" , "ଚ" ,
"n" , "ଚ୍ଚ" ,
"R" , "ଛ" ,
"S" , "ଜ" ,
"U" , "ଞ" ,
"V" , "ଟ" ,
"W" , "ଠ" ,
"XÏ" , "ଡ଼" ,
"X" , "ଡ" ,
"YÏ" , "ଢ଼" ,
"Y" , "ଢ" ,
"Z" , "ଣ" ,
"À" , "ଣ୍ଣ" ,
"\[" , "ତ" ,
"\\" , "ଥ" ,
"\]" , "ଦ" ,
"\^" , "ଧ" ,
"\_" , "ନ" ,
"\`" , "ପ" ,
"a" , "ବ" ,
"c" , "ମ" ,
"d" , "ଯ" ,
"f" , "ଳ" ,
"g" , "ୱ" ,
"h" , "ଶ" ,
"i" , "ଷ" ,
"j" , "ସ" ,
"l" , "କ୍ଷ" ,
"s" , "ଜ୍ଞ" ,
"q" , "ଞ୍ଚ" ,
"t" , "ନ୍ଦ" ,
"u" , "ନ୍ଧ" ,
"v" , "ବ୍ଦ" ,
"w" , "ଦ୍ଧ" ,
"x" , "ନ୍ଥ" ,
"y" , "ସ୍ଥ" ,
"õ" , "୍ର" ,
"ö" , "୍ର" ,
//"Ô" , "୍ୟ" ,
"è" , "୍ୱ" ,
"÷" , "୍ଭ" ,
"ë" , "୍ମ" ,
"ê" , "୍ମ" ,
"ï" , "୍ନ" ,
"é" , "୍ୱ" ,
"í" , "୍ଲ" ,
"î" , "୍ଲ" ,
"¢" , "କ୍ଲ" ,
"²" , "ସ୍କ" ,
"\«" , "ନ୍ତ" ,
"\¨" , "ଣ୍ଡ" ,
"\¯" , "ୟ" ,
"ª" , "ସ୍ତ" ,
"\¦" , "କ୍ତ" ,
"§" , "ନ୍ତ୍ର" ,
"³" , "ଜ୍ଜ" ,
"©" , "ପ୍ତ" ,
"\=" , "ଙ୍ଗ" ,
" ଙ୍ଗ " , "\ = " , // Equal Sign
"\*" , "ଙ୍କ" ,
"\&" , "ଞ୍ଜ" ,
"\$" , "ଫ" ,
"Ã" , "ଣ୍ଟ" ,
"½" , "ଷ୍ଟ" ,
"¾" , "ଶ୍ଚ" ,
"º" , "ଷ୍ଠ" ,
"Á" , "ଳ୍ପ" ,
"¹" , "ଷ୍ପ" ,
"¸" , "ସ୍ପ" ,
"Ù" , "ିà" ,
"Ð" , "ା" ,
"Þ" , "ି" ,
"Ñ" , "ୀ" ,
"Ê" , "ୁ" ,
"ã" , "ୁ" ,
"Ë" , "ୂ" ,
"ó" , "ୃ" ,
"ô" , "ୃ" ,
"Ü" , "ଁ" ,
"Õ" , "ଂ" ,
"Ó" , "ଃ" ,
"ç" , "୍" ,// halant with ZWJ
"Ö" , "ଂ" ,
"Ú" , "ିଁ" ,
"Û" , "ଁ" ,
"Ý" , "ଁ" ,
"á" , "୍ନ" ,
"â" , "୍ଲ" ,
"ä" , "ୁ" ,
"å" , "ୂ" ,
"æ" , "ୂ" , //
"ì" , "୍ଳ" ,
"ð" , "୍ନ" ,
"ø" , "୍ଭ" ,
"û" , "୰" ,
"ý" , "୍ଳ" ,
"@" , "ଅ" ,
"A" , "ଆ" ,
"B" , "ଇ" ,
"C" , "ଈ" ,
"D" , "ଉ" ,
"E" , "ଊ" ,
"F" , "ଋ" ,
"G" , "ୠ" ,
"H" , "ଏ" ,
"I" , "ଐ" ,
"J" , "ଓ" ,
"K" , "ଔ" ,
// new additions...
"ଧù" , "ଧି" ,
"ପú" , "ତ୍ପ" ,
"†", "ପ୍ଟ",
"œ", "କ୍ଟ",
"‡", "ୁ",
"ƒ" , 'ମ୍ପ' ,// mpa
"„" , 'ମ୍ପ' ,// mpa
"…" , "ଣ୍ଠ" // NTha
//"" , "",
//"" , ""
)
//**********************************************
var text_array_length = text_array.length ;
var modified_substring = document.getElementById("nonunicode_text").value ;
Replace_text( ) ;
document.getElementById("unicode_text").value = modified_substring ;
// --------------------------------------------------
function Replace_text( )
{
//substitute array_two elements in place of corresponding text_array elements
if ( modified_substring != "" ) // if string to be converted is non-blank then no need of any processing.
{
for ( input_symbol_idx = 0; input_symbol_idx < text_array_length-1; input_symbol_idx = input_symbol_idx + 2 )
{
//******************************************************
idx = 0 ; // index of the symbol being searched for replacement
while (idx != -1 ) //while-00
{
modified_substring = modified_substring.replace( text_array[ input_symbol_idx ] , text_array[input_symbol_idx+1] )
idx = modified_substring.indexOf( text_array[input_symbol_idx] )
} // end of while-00 loop
} // end of for loop
// see if the following needs to include more letters than [କସ]
modified_substring = modified_substring.replace( /([କସ])([ú])/g , "ତ୍$1" ) ;
// following statements for adjusting position of e, ai, o and au maatraas.
modified_substring = modified_substring.replace( /([Ò])([କଖଗଘଙଚଛଜଝଞଟଠଡଡ଼ଢଢ଼ଣତଥଦଧନପଫବଭମଯରଲଳୱଶଷସହକ୍ଷଜ୍ଞୟ])/g , "$2$1" ) ;
modified_substring = modified_substring.replace( /([Ò])([୍])([କଖଗଘଙଚଛଜଝଞଟଠଡଡ଼ଢଢ଼ଣତଥଦଧନପଫବଭମଯରଲଳୱଶଷସହକ୍ଷଜ୍ଞୟ])/g , "$2$3$1" ) ;
modified_substring = modified_substring.replace( /([Ò])([୍])([କଖଗଘଙଚଛଜଝଞଟଠଡଡ଼ଢଢ଼ଣତଥଦଧନପଫବଭମଯରଲଳୱଶଷସହକ୍ଷଜ୍ଞୟ])/g , "$2$3$1" ) ;
modified_substring = modified_substring.replace( /Òß/g , "ୈ" ) ;
modified_substring = modified_substring.replace( /Òା/g , "ୋ" ) ;
modified_substring = modified_substring.replace( /Ò×/g , "ୌ" ) ;
modified_substring = modified_substring.replace( /Ò/g , "େ" ) ;
//following three statement for adjusting position of reph ie, half r .
modified_substring = modified_substring.replace( /([କଖଗଘଚଛଜଝଟଠଡଡ଼ଢଢ଼ଣତଥଦଧନପଫବଭମଯରଲଳୱଶଷସହକ୍ଷଜ୍ଞୟ])([ାିୀୁୂୃେୈୋୌଂଁ]*)à/g , "à$1$2" ) ;
modified_substring = modified_substring.replace( /([କଖଗଘଚଛଜଝଟଠଡଡ଼ଢଢ଼ଣତଥଦଧନପଫବଭମଯରଲଳୱଶଷସହକ୍ଷଜ୍ଞୟ])([୍])à/g , "à$1$2" ) ;
modified_substring = modified_substring.replace( /à/g , "ର୍" ) ;
modified_substring = modified_substring.replace( /([ଂଁ])([ାିୀୁୂୃେୈୋୌ])/g , "$2$1" ) ;
// new added features...
modified_substring = modified_substring.replace( /([୧୨୩୪୫୬୭୮୯୦])([ା।])([୧୨୩୪୫୬୭୮୯୦])/g , "$1|$3" ) ; // news paper style
modified_substring = modified_substring.replace( /([ାିୀୁୂୃେୈୋୌ])([Ô])/g , "$2$1" ) ;
modified_substring = modified_substring.replace( /Ô/g , "୍ୟ" ) ;
modified_substring = modified_substring.replace( /େ୍ୱ/g , "୍ୱେ" ) ;
//exceptions...
modified_substring = modified_substring.replace( /ଦ୍ଧ୍ୱର୍/g , "ର୍ଦ୍ଧ୍ୱ" ) ;
} // end of IF statement meant to suppress processing of blank string.
} // end of the function Replace_Symbols
} // end of convert_to_unicode function
function SelectAll(id)
{
document.getElementById(id).focus();
document.getElementById(id).select();
}
</script>
</head>
<body bgcolor=#D3D3D3 style='tab-interval:36.0pt'>
<div class=Section1>
<p align=center style='text-align:center'><font size="5" face="sans-serif"><b><span
style='color:#316E89'> OR-TT Sarala - Unicode Odia converter </span></b></font><br/><font face="sans-serif">Copy OR-TT Sarala text and paste below</font></p>
<form name=form1>
<p align=center style='text-align:center'><TEXTAREA ROWS="10" COLS="110%" NAME="TextToConvert"
id="nonunicode_text"></TEXTAREA></p>
<p align=center style='text-align:center'>
<input type=button name=converter id=converter value=" CONVERT " style="width:90px;float:center;background-color:#4AAAD1;color:#FFFFFF;font-weight:bold;margin-left:4px;padding:8px;"
accesskey=c title="Alt + Shift + c" onClick="convert_to_unicode(),SelectAll('unicode_text');"><br/><br/>
<align=center style='text-align:center'><font size="3" face="sans-serif">Converted Unicode text below<br/>
<font size="2" face="sans-serif"><span
style='color:#606060'>You can copy and use the text below in Facebook, E-mail, blogs, websites and <a href="https://or.wikipedia.org/wiki/WP:CS">ODIA WIKIPEDIA.</a></font></span>
<TEXTAREA ROWS="30%" COLS="110%" NAME="ConvertedText" id="unicode_text"></TEXTAREA><o:p></o:p></p>
</form>
<p align=center style='text-align:center'><span
style='color:#515151'><font size="2">Designed by <a href="http://in.linkedin.com/in/manojsahukar/" target="_blank" title="Reach to me">Manoj Sahukar</a> and <a href="https://meta.wikimedia.org/wiki/User:Psubhashish" target="_blank" title="Reach to me">Subhashish Panigrahi</a>. Under CC-BY-SA 3.0. Inspired by Rebati converter by Srujanika.<br/><a href="https://22bc339da9ca3e2462414546a715752e4c2c5e0d.googledrive.com/host/0B5rBGd680WZFemVLa3RxY0preE0/ShreeUnicode" target="_blank" title="Click here"> Click here<a> for Shreelipi-Unicode converter.</font></span></p>
</div>
</body>
</html>