unicode

PHP Bijoy to Unicode Converter

In our latest project at PROGmaatic, we needed a converter to convert lots of information written in Bangla. Unfortunately  everything was in Bijoy (SutonnyMJ) font. But our requirement was Unicode formatted data and language preference was PHP.

 

I thought, no big deal. There should have been lots of converters available, and most of them might be in PHP. After hours of searching (Yes I don’t like coding when I can find something free :D).

Well, I haven’t found a single script which would do what I needed. Two of the following did help me to understand how to develop the converter:

So finally I end up coding one myself. Fork it from my Github account.

In the coding process I have learnt two valuable lessons 🙂

1. javascript string method ‘substring‘ is not equivalent to PHP’s string function ‘substr‘ [I spent only 5 hours for this mistake!!!]

2. Nothing is better than step-by-step Debugging!

 

Future modifications:

1. Make mbstring independent. (I actually figured out the way, but right now I don’t need it since I have mbstring support :))

2. Make memory efficient.

 

Check the code and let me know if you find a better way, find a bug or need some modification. I will be happy to make the changes and give you the credit 🙂