Fayaz Khan
Fayaz Khan

Reputation: 53

Inpage urdu to unicode Urdu converter

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

Answers (2)

Umer Farooq
Umer Farooq

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

Zeeshanef
Zeeshanef

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:

  1. Copy Inpage text in textbox.
  2. Bring this text in Php.
  3. 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

Related Questions