Reputation: 53
Inpage is an Urdu software with which we can write Urdu. I found a website which provides the feature to convert Inpage Urdu Text to Unicode Urdu found here.
I want that functionality in PHP. Is there any way to do this?
Thanks in advance.
Upvotes: 3
Views: 4943
Reputation: 792
Though its an old question but i would like to answer it so that it would help others who are still looking for the solution
Converter converter;
std::wstring UrduUnicodeText = converter.inpageToUnicode(InpageText);
std::wstring InpageText = converter.unicodeToInpage(UrduUnicodeText);
Check this source code at Github
Upvotes: 0
Reputation: 709
There is an Open source Inpage Urdu to Unicode Urdu Converter Pak Inpage To Unicode Converter
, it was developed in Vb.net, but you can get the clue.
http://dl.dropbox.com/u/2700846/_InPageConverter.zip
To Start:
Convert text into Byte Array.
for($i = 0; $i < strlen($inpage_data); ++$i)
{
$inp_code = ord($inpage_data[$i]);
if ($inp_code == 128)
{
$unicode_urdu = $unicode_urdu . 'ب';
}
}
echo $unicode_urdu;
?>
Every word in Inpage has unique code like, Alif = 129, Bay = 128, Pay = 146.
now convert inpage text to unicode Urdu accordingly in loop.
Upvotes: 6