Menu
Preeti to unicode converter is a tool to convert nepali font preeti to nepali unicode. Preeti to unicode, preeti to unicode converter, Preeti to unicode converter converts preeti font to unicode font. Among preeti to unicode converter platforms, Preeti to unicode converter available on preeti.arthasarokar.com is most popular automatic preeti to unicode converter.
Active11 months ago
I am new to javascript and recently joined Bachelor.In my first semester,I was given project to convert Unicode to Preeti (Nepali font) which is ASCII code.The Dictionary for conversion was listed as :
unicodeToPreetiDict =
Left part of character is Unicode whereas right part is Preeti font maybe.
You can check the conversion after writing code in this sample site:http://unicode.shresthasushil.com.np/
If we give input as कलम (unicode),it must be converted to Preeti.I need source code in javascript or php to convert unicode to preeti.
Suman Basnet
Suman BasnetSuman Basnet
2 Answers
One way is to hard code it with a switch
And when you're sure it's working as intended and done testing, you can smash it into one line so you dont waste text editor space.
And so if you had a string of unicode characters, your code might look like this:
Make sure that in your html file you have a
<meta charset='utf-8'>
tag.If for some reason you can't get this method to work, there are some other methods I found out there regarding splitting using charCodeAt.
An example of this kind of method would be like so :
I strongly recommend just using the first method I made for you though, as it is much easier to control.
JaminJamin
You use arrays to search/replace in
str_replace
in PHPTy KrollTy Kroll