forked from OdiaWikimedia/Converter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unicode to Akruti-Sarala Converter.htm
358 lines (281 loc) · 10.8 KB
/
Unicode to Akruti-Sarala 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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="author" content="Manoj Sahukar">
<meta name=Description content=Unicode to Akruti-Sarala - Converter>
<meta name=Author1 content=Manoj Sahukar>
<title> Unicode to Akruti-Sarala Converter</title>
<style>
</style>
<script type="text/javascript">
function convert_to_unicode()
{
var text_array = new Array(
" û", " ।", // purnacheda
"ö" , " ।" , // purnacheda
//"÷÷÷", "", //
// Compound letter group start
"<" , "ଣ୍ଟ" , // N-T
"…" , "ଟ୍ଟ" , // TT
"μ" , "ମ୍ପ" , // mp
"µ" , "ମ୍ପ" , // mp
"‰" , "ଣ୍ଣ" , // NN
"Š" , "ଣ୍ଡ" , // ND
"Œ" , "ଣ୍ଠ" , // NTh
"™" , "ତ୍ମ" , // tm
"š" , "ତ୍ପ" , // tp
"›" , "ତ୍ସ" , // ts
"œ" , "ତ୍ସ୍ନ" , // t-s-n
"Ÿ" , "ଦ୍ଧ" , // d-dh
"{" , "ଜ୍ଜ" , // jj
"|" , "ଜ୍ଝ" , // j-jh
"}" , "କ୍ର" , // kr
"¡" , "ଦ୍ଧ" , // d-dh
"¢" , "ଦ୍ଘ" , // d-gh
"¤" , "ଧ୍ୟ" , // dhya
"¦" , "ନ୍ଦ" , // nd
"§" , "ନ୍ଧ" , // ndh
"©" , "ତ୍ତ" , // tt
"ª" , "ନ୍ତ୍ର" , // ntr (jantra)
"«" , "ନ୍ତ" , // nt
"¬" , "ଞ୍ଜ" , // nj
"ƒ" , "ଞ୍ଝ" , // njh
"®" , "ପ୍ପ" , // pp
"¯" , "ପ୍ତ" , // pt
"°", "ପ୍ସ" , // ps
"±" , "ବ୍ଦ" , // bd
"²" , "ବ୍ଧ" , // bdh
"´" , "ମ୍ବ" , // mb
"¸" , "ମ୍ଭ" , // mbh
" ̧" , "ମ୍ଭ", // ***mbha
"̧" , "ମ୍ଭ", // mbha
"¹" , "ମ୍ମ" , // mm
"º" , "ଲ୍କ" , // lk
"»" , "ଲ୍ଗ" , // lg
"¼" , "ଶ୍ଛ" , // Nch
"½" , "ଶ୍ଚ" , // S-ch (talabya sa - ca)
"¾" , "ଷ୍ଣ" , // sh-N (murdhanya sa - Na)
"¿" , "ଷ୍ପ" , // sh-p (murdhanya sa - pa)
"À" , "ଷ୍ଫ" , // sh-ph (murdhanya sa - pha)
"Á" , "ଷ୍ଟ" , // sh-T (murdhanya sa - Ta)
"Â" , "ଷ୍ଠ" , // sh-Th (murdhanya sa - Tha)
"Ã" , "ଷ୍କ" , // sh-k (murdhanya sa - ka)
"Ä" , "ସ୍କ" , // s-k
"Å" , "ସ୍ଖ" , // sh-kh
"Æ" , "ସ୍ପ" , // sp
"Ç" , "ସ୍ଫ" , // sph
"È" , "ସ୍ତ୍ର" , // str
"É" , "ସ୍ତ" , // st
"Ê" , "ସ୍ୱ" , // sb
"Ë" , "ଳ୍କ" , // lk
"Ì" , "ଳ୍ପ" , // Lp
"Í" , "ଳ୍ଫ" , // Lph
"Î" , "ତ୍ଥ" , // t-th
"Ï" , "ଳ୍ଳ" , // L-L
"@ା" , "ଆ" , // aa
"l" , "କ୍ଷ" , // ksh
"m" , "ଜ୍ଞ" , // gya
"n" , "ଦ୍ଭ" , // d-bh
"o" , "କ୍ଟ" , // kT
"p" , "କ୍ଟ୍ର" , // kTr
"q" , "କ୍ତ" , // kt
"r" , "କ୍ସ" , // ks
"s" , "ଗ୍ଦ" , // gd
"t" , "ଗ୍ଧ" , // gdh
"u" , "ଙ୍କ" ,
"v" , "ଙ୍ଖ" ,
"w" , "ଙ୍ଗ" ,
"x" , "ଙ୍ଘ" ,
"y" , "ଚ୍ଚ" ,
"z" , "ଚ୍ଛ" ,
" ̄", "ପ୍ତ",
" ́", "ଙ୍କ",
"‹", "ଣ୍ଢ" , // ndha
"Ð" , "କ୍ଷ୍ଣ" , // khya-N
"*" , "ଞ୍ଚ" , // nc
// Compound letter group end
//double letter text group start
"ଏø", " ଐ", // ai
"୍ଯ" , "୍ୟ", // ja phala
" ̈", "୍", // halanta with ZWJ
"î" , "୍ରୁ" , // halanta-r-u
"ï" , "୍ରୂ" , // halanta-r-dirgha u
"Ñ" , "୍କ" , // halanta-k
"Ò" , "୍ଖ" , // halanta-kh
"Ó" , "୍ଗ" , // halanta-g
"Ô" , "୍ଚ" , // halanta-c
"Õ" , "୍ଜ" , // halanta-j
"Ö" , "୍ଟ" , // halanta-T
"×" , "୍ଠ" , // halanta-Th
"Ø" , "୍ଡ" , // halanta-D
"Ù" , "୍ଣ" , // halanta-N
"Ú" , "୍ଥ" , // halanta-th
"Û" , "୍ଧ" , // halanta-dh
"Ü" , "୍ନ" , // halanta-n
"Ý" , "୍ପ" , // halanta-p
"Þ" , "୍ଫ" , // halanta-ph
"ß" , "୍ୱ" , // halanta-b
// double accented - AkrutiOriSarala
"£" , "୍ମ" , // ma phala
"à" , "୍ମ" , // ma phala
"á" , "୍ମୃ" , // (halanta)m-Rû
"â" , "୍ର" , // ra
"ã" , "୍ର" , // reph
"ä" , "୍ଲ" , // la phala
"å" , "୍ଭ" , // halanta- bha
"æ" , "୍ଳ" , // halanta-La
"ç" , "୍ୱ" , // ba phala
"è" , "୍ସ" , // halanta-sa
"ý", "୍ୟ" , // ja phala
"¥", "୍ୟ" , // ja phala
"ó", "ିଁ" , // i kara
"[ô" , "ଥି" , // thi
"]ô" , "ଧି" , // dhi
"Lô" , "ଖି" , // khi
"cô", "ତ୍ମ" , // tma
"¨", "୍" , // halanta with zero width non joiner
//double letter text group end
//single letter text group
"@" , "ଅ" , // a
"A" , "ଇ" , // i
"B" , "ଈ" , // dirgha i
"C" , "ଉ" , // u
"D" , "ଊ" , // dirgha u
"E" , "ଋ" , // R
"F" , "ୠ" , // RR
"G" , "ଏ" , // e
"H" , "ଐ" , // ai
"I" , "ଓ" , // o
"J" , "ଔ" , // au
"K" , "କ" , // k
"L" , "ଖ" , // kh
"M" , "ଗ" , // g
"N" , "ଘ" , // gh
"O" , "ଙ" ,
"P" , "ଚ", // c
"Q" , "ଛ", // ch
"R" , "ଜ", // j
"S" , "ଝ", // jh
"T" , "ଞ", // Nya
"U", "ଟ" , // T
"V", "ଠ" , // Th
"W", "ଡ" , // D
"X", "ଢ" , // Dh
"Y", "ଣ" , // N
"Z" , "ତ" , // t
"[" , "ଥ" , // th
"\\" , "ଦ" , // d
"]" , "ଧ" , // dh
"^", "ନ" , // n
"~" , "ଯ" , // y
"_" , "ପ", // p
"`" , "ଫ", // ph
"a" , "ବ", // b
"b" , "ଭ", // bh
"c" , "ମ", // m
"d" , "ୟ" , // y
"e" , "ର" , // r
"f" , "ଲ" , // l
"g" , "ଶ" , // S (talabya sa)
"h" , "ଷ" , // sh (murdhanya sa)
"i" , "ସ" , // s
"j" , "ହ" , // h
"k" , "ଳ",
"û" , "ା" , // aa kara
"ò" , "ି" , // i kara
"ú" , "ୀ" , // dirgha i kara
"ê" , "ୁ" , // u kara
"ë" , "ୁ" , // u kara
"ì" , "ୂ" , // dirgha i kara
"í" , "ୂ" , // dirgha u kara
"é" , "ୃ" , // ru kara
"ñ", "ଁ" , // chandrabindu
"õ", "ଂ" , // anuswara
"ü", "ଃ" , // bisarga
"þ", "୍" , //halanta
"Iß" , "ୱ", //wa
"Wÿ" , "ଡ଼" , // Da with bindu
"Xÿ" , "ଢ଼" , // Dha with bindu
"Pÿ" , "ଚ" , // c
"1" , "୧" , // Numeric 1
"2" , "୨" , // Numeric 2
"3" , "୩" , // Numeric 3
"4" , "୪" , // Numeric 4
"5" , "୫" , // Numeric 5
"6" , "୬" , // Numeric 6
"7" , "୭" , // Numeric 7
"8" , "୮" , // Numeric 8
"9" , "୯" , // Numeric 9
"0" , "୦" , // Numeric 10
"#" , "୰" , // late
"$" , "ଽ" ,
"&" , "ଌ" // lu // L
)
//**********************************************
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 ( index = 0; index < text_array_length-1; index = index + 2 )
{
//******************************************************
idx = 0 ; // index of the symbol being searched for replacement
//while (idx != -1 ) //while-00
//{
modified_substring = modified_substring.replace( text_array[ index+1] , text_array[index] )
idx = modified_substring.indexOf( text_array[index] )
//} // end of while-00 loop
} // end of for loop
// 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 , "ð$1$2" ) ;
modified_substring = modified_substring.replace( /([କଖଗଘଚଛଜଝଟଠଡଡ଼ଢଢ଼ଣତଥଦଧନପଫବଭମଯରଲଳଵଶଷସହକ୍ଷଜ୍ଞୟ])([୍])ð/g , "ð$1$2" ) ;
modified_substring = modified_substring.replace( /ð/g , "ର୍" ) ;
modified_substring = modified_substring.replace( /([ଂଁ])([ାିୀୁୂୃେୈୋୌ])/g , "$2$1" ) ;
} // end of IF statement meant to suppress processing of blank string.
} // end of the function Replace_text
} // 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'> Unicode Odia - Akruti Sarala converter </span></b></font><br/><font face="sans-serif">Copy Akruti 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>