Unicode converter

487 views
Skip to first unread message

Ajith Manjula

unread,
Apr 5, 2008, 8:01:48 AM4/5/08
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
hi,
Can anyone pls provide me the technology to convert between Unicode
and traditional
sinhala fonts (FM/ DL etc) using PhP?
thank you

regards
Ajith Manjula
<Sorry for type in English>

(විශ්ව කුමාර)

unread,
Apr 5, 2008, 2:30:22 PM4/5/08
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
සිංග්ලිශ් වල API එක භාවිතා කර පහසුවෙන් DL to Unicode පරිවර්තනය කල
හැකියි. නමුත් ඔබට අවශ්‍ය යුනිකේත DL වලට හැරවීමද?

php වලටනම් මෙසේ පහසුකමක් ගැන අසා නැහැ. අලුතෙන් ම හදන්නෙ වෙයි වගේ.

රොශාන්

unread,
Apr 6, 2008, 5:42:25 AM4/6/08
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
http://www.ucsc.cmb.ac.lk/ltrl/?page=downloads&lang=en&style=default
ඔබට අවශ්‍ය සිංහල හා බැඳුන මෘදුකාංග මෙතනින් ගන්න.
http://www.ucsc.cmb.ac.lk/ltrl/downloader.php?resource=feconv ඔබ සෙවූ
මෘදුකාංගය මේකයි කියල මම හිතනව. ඔයා ගිහින් බලන්න. ඔබට සුභ දවසක්!!!!

(විශ්ව කුමාර)

unread,
Apr 6, 2008, 10:00:26 PM4/6/08
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
මට පෙනෙන විදිහට අජිත්ට අවශ්‍ය වී ඇත්තේ මෘදුකාංගය නොව මෘදුකාංගයක්
තැනීමට අවශ්‍ය තාක්ශණයයි.

ඔබට අවශ්‍ය Algorythm එක VB වලින් නම් ඇත.

tidalbobo

unread,
Apr 6, 2008, 11:04:21 AM4/6/08
to Sinhala...@googlegroups.com
there in no "technology"  as such...

what u need to do is have a conversion map.
ex:  
<unicode letter/ set of letters 1 > = <traditions font letter 1 >
<unicode letter/ set of letters 2 > = <traditions font letter 2 >
.....................
<unicode letter/ set of letters N> = <traditions font letter N >

then read the string and replace letters/set of letters using the converstion map
u can buid maps for any font u like, and use the same code.

Rgds
Gayan

Srimal Jayawardena ශ්‍රීමාල් ජයවර්ධන

unread,
Apr 7, 2008, 12:08:20 AM4/7/08
to Sinhala...@googlegroups.com
As I remember, Gayan, you had built a tool to do this sometime back.

Is it available for download somewhere?

Regs

Srimal.

--
~ශ්‍රීමාල් ජයවර්ධන~
http://srimal.sri-lankan.net/

tidalbobo

unread,
Apr 7, 2008, 3:29:27 AM4/7/08
to Sinhala...@googlegroups.com
he needs the algo, not he code

Ajith Manjula

unread,
Apr 7, 2008, 6:40:41 AM4/7/08
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
actually i know how to convert form one font to another... (eg: form
Kaputa Sinhala Font to FM (Wijesekara) Sinahala Fonts) But the problem
is, i can't do that with Unicode. I think that's because it is a
different ENCODING (while above mentioned fonts uses the same Encode
as English)

So, it's bot clear to me, how to specify a Unicode Sinhala character
in PhP scripting...

The easiest solution is if i can PASS my text in to a hosted script,
just like Online Converter of UCSC, and get the translated text using
a script.. unfortunately, the UCSC converter seems can be used only by
manually entering text on their text box, not calling by a script..

Ajith Manjula

Ajith Manjula

unread,
Apr 7, 2008, 6:45:06 AM4/7/08
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
the software you mentioned is the thing i neeed. But i need the "web
version" of it.. that means it should be able install on a web server
(should be in php or js)
> ඔබට අවශ්‍ය සිංහල හා බැඳුන මෘදුකාංග මෙතනින් ගන්න.http://www.ucsc.cmb.ac.lk/ltrl/downloader.php?resource=feconvඔබ සෙවූ
> මෘදුකාංගය මේකයි කියල මම හිතනව. ඔයා ගිහින් බලන්න. ඔබට සුභ දවසක්!!!!
>
> On Apr 5, 2:01 pm, Ajith Manjula <ajith...@gmail.com> wrote:
>
>
>
> > hi,
> > Can anyone pls provide me the technology to convert between Unicode
> > and traditional
> > sinhala fonts (FM/ DL etc) using PhP?
> > thank you
>
> > regards
> > Ajith Manjula
> > <Sorry for type in English>- Hide quoted text -
>
> - Show quoted text -

Nalaka Jayasena

unread,
Apr 8, 2008, 1:38:32 PM4/8/08
to Sinhala...@googlegroups.com
I haven't tried this but you may be able to get somewhere using the iconv functions.
such as: iconov_strlen(), iconov_strpos(), iconov_strrpos(), iconov_substr()

According to the PHP5 manual:
With the iconv module, you can turn a string represented by a local character set into the one represented by another character set, which may be the Unicode character set.

Isn't this what you want to do?
So if you plugin the algorithm for mapping between character sets you should be ok...
--
Nalaka Jayasena (නාලක ජයසේන)
http://nalakajayasena.wordpress.com

(විශ්ව කුමාර)

unread,
Apr 9, 2008, 2:48:59 AM4/9/08
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
php තුල කෙලින්ම යුනිකේත අක්ශරය සටහන් කරන්න!, UTF-8 Encoding එකෙන් Save
කරන්න!!
ඔබ Session භාවිතා කරන්නේනම් යුනිකේත (UTF-8 Encoding) ඇති කොටස වෙනම
ගොනුවක් ලෙස සුරැකුම් කර ප්‍රධාන Code කොටසට Include කරන්න...

tidalbobo කියන ඇල්ගොරිදමයද හොඳයි. නමුත් මා එවූ ඇල්ගොරිදමය ඊට වඩා
වේගවත් බව පෙනේවි. tidalbobo ගේ ක්‍රමයේදී සියලුම යුනිකේත සිංහල අක්ශර
සංයුතීන් සඳහා දී ඇති මුලු Text කොටසම නැවත නැවත Search කල යුතු වෙනවා.
මා එවූ ක්‍රමයේදී දී ඇති Text කොටසේ සෑම Syllable කොටසකටම ගැලපෙන යුනිකේත
කොටස ලැයිස්තුවෙන් සොයනවා. එම ලැයිස්තුවට Binary Search වැනි ක්‍රමයක්
එක් කිරීමෙන් වේගය වැඩි කරගත හැකි වෙනවා. තවද එහි ලිවීමේ පහසුවට භාවිතා
කර ඇති Select Case වෙනුවට If Else If භාවිතා කොලොත් තවත් වේගය වැඩි වේවි.

(විශ්ව කුමාර)

unread,
Apr 10, 2008, 10:04:35 AM4/10/08
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
මොකද තත්වේ...
Reply all
Reply to author
Forward
0 new messages