"Date of Birth" → "উধঃব ড়ভ ইরৎঃয"
That is what happens when a Bijoy → Unicode converter runs its character map over English text. On a mixed Bangla/English form — a bio-data sheet, a job application, a government Word file — that is half the document ruined.
I already wrote about why I built bijoy2unicode, and about the font-inheritance chain it walks inside a .docx. Today I wanted a concrete before/after, so I built a small test file and ran it through bijoy2unicode 1.0.2 from npm.
The test file
Each label is two runs in the same paragraph: English in Calibri, then Bangla in SutonnyMJ (Bijoy).
Before:
Name / bvg Father's Name / wcZvi bvg Date of Birth / Rb¥ ZvwiL Permanent Address / ¯’vqx wVKvbv After convertDocx:
Name / নাম Father's Name / পিতার নাম Date of Birth / জন্ম তারিখ Permanent Address / স্থায়ী ঠিকানা The English is still English. The Bangla is Unicode. That is the whole point.
If I instead call the string API on the English, the map does exactly what it is designed to do — it always converts:
import { convertBijoyToUnicode } from "bijoy2unicode"; convertBijoyToUnicode("Date of Birth"); // → "উধঃব ড়ভ ইরৎঃয" convertBijoyToUnicode("Name"); // → "ঘধসব" convertBijoyToUnicode is documented as "always converts." That is the right default for a known Bijoy string. It is the wrong default for a whole Word document.
Font first, then the map
The file API does not run that map over every <w:t>. It walks the OOXML and resolves the effective font of each run, the same way Word does:
- The run's own
<w:rFonts> - The run's character style
- The paragraph's run fonts
- The paragraph style, following the
basedOnchain - The document default,
<w:rPrDefault>
If the resolved font is a known Bijoy face (names ending in MJ, plus BijoyEkattor, Sulekha, Boishakhi, and similar), the run is converted. If it is a known Unicode Bangla face (Nikosh, SolaimanLipi, Vrinda, Noto Bengali, …), it is left alone. Ambiguous runs fall back to character heuristics.
In this test file the decision is easy: Calibri stays, SutonnyMJ converts.
import { convertDocx } from "bijoy2unicode/docx"; const blob = await convertDocx(file); // "Date of Birth / Rb¥ ZvwiL" → "Date of Birth / জন্ম তারিখ" Why heuristics alone are not enough
The interesting part of this file is not "Date of Birth." It is bvg.
bvg is how "নাম" is stored in Bijoy. It is also three ASCII letters. There are no high-byte characters to give the game away. The package's own detector agrees that this is ambiguous:
import { shouldConvertAsBijoy } from "bijoy2unicode"; shouldConvertAsBijoy("bvg"); // false shouldConvertAsBijoy("wcZvi bvg"); // false shouldConvertAsBijoy("Date of Birth"); // false shouldConvertAsBijoy("Rb¥ ZvwiL"); // true (the ¥ is a giveaway) Rb¥ ZvwiL (জন্ম তারিখ) can be spotted from the text. bvg cannot. In a .txt or .rtf with no font information, that is a real limitation — you pass { force: true } when you already know the file is Bijoy. In a .docx, the SutonnyMJ font on the run is the signal, and convertDocx uses it. That is how "Name / bvg" becomes "Name / নাম" instead of "ঘধসব / নাম", or worse, staying as "Name / bvg".
Try it
The converter is MIT-licensed TypeScript, ESM + CJS, Node 18+. There is a browser app at bijoy2unicode.jehadurre.me. Drag a .docx onto the page; conversion stays in your browser.
npm install bijoy2unicode Source: github.com/JehadurRE/Bijoy2Unicode.
This was a clean test file. Real office and government documents are messier: missing fonts on a run, odd style inheritance, leftover unmapped characters, mixed Unicode that has already been half-converted. That is where I would like help.
If you have an ugly mixed-font Bijoy .docx that still converts badly, please open an issue or send it to me, with personal details removed. The live app also has a leftover-character report flow for the same thing.
I am Jehadur Rahman Emran. If the tool saved you a document, a star on the repo helps the next person find it.

