Why detection matters
Converting Unicode as if it were Bijoy, or the other way around, makes the text worse. Operators do this when a client says “the font is broken” and everyone guesses. The font is rarely broken. The bytes and the font do not agree.
Unicode Bangla lives in the block U+0980 to U+09FF. If you can search the document for অ or ক and the editor finds it, you have Unicode. Bijoy text is stored as Latin / extended-ANSI symbols. In a Unicode-aware box it looks like Avwg evsjvq Mvb MvB — English-looking junk — until you apply SutonnyMJ.
Mixed files are the trap. A reporter writes in Avro (Unicode), a page-maker pastes a headline from an old Bijoy archive, and the PDF looks fine on one PC. The next person copies both layers into Gmail. This detector counts Unicode letters and typical Bijoy symbols so you can split the job.
Next step is usually Bijoy to Unicode for web publishing, or Unicode to Bijoy for a press that still wants ANSI.