Ali-K to Unicode: Converting Old Kurdish Documents

Ali-K to Unicode: why old Kurdish documents break on phones, web and search, and a step-by-step way to convert, normalise and spell-check them safely.

Ali-K to Unicode: Converting Old Kurdish Documents

Many offices, universities and ministries in the Kurdistan Region hold years of letters, transcripts and reports typed in Ali-K fonts. They look fine in Word on the old office PC. Paste the same text into WhatsApp, a website, a database or an AI tool, though, and it turns into broken words that nobody can search. In my view, moving these files from Ali-K to Unicode is one of the cheapest and most useful digitalisation jobs an organisation can do. Here is a practical way to do it without breaking formatting or leaking documents.

Why Ali-K text breaks outside Word

Ali-K fonts were developed by Abas Majid in 1997, and Dylan fonts by Dylan Saleh at KurdSoft in 2001. Both solved a real problem at the time. Kurdish letters were not easy to type, so these fonts drew Kurdish shapes on top of ordinary Arabic characters.

The result is that the stored text is not really Kurdish. The AsoSoft Library gives a clear example. The Ali-K text "خويَندكار بة طوَرِانكاريية" becomes, in proper Unicode, "خوێندکار بە گۆڕانکارییە".

When the font is present, you see the second version. When it is missing, which is the case on most phones, browsers and AI tools, you get the first. A search for گۆڕانکاری will never find it.

The problem has not gone away. Typing with Ali fonts remains popular because it does not need a Kurdish keyboard layout, so organisations keep producing new legacy files.

Take stock before you convert anything

Do not start with a converter. Start with a list.

  • Find the files. Look for .doc, .docx, .xls, .ppt and PDF files, plus database fields from older web systems and intranets.
  • Check the fonts. In Word or PowerPoint, see which fonts each file uses. Ali-K names include Alwand, Azzam, Hasan, Jiddah, Kanaqen, Khalid, Sahifa, Samik, Sayid, Sharif, Sulaimania and Traditional. Ali-Web fonts include Malper, Samik and Traditional.
  • Use a quick text test. Kurdish text containing ة, ط or ك where you would expect ە, گ or ک is almost always legacy encoding.
  • Watch the overlap. Samik and Traditional appear in both the Ali-K and Ali-Web lists, so the font name alone cannot tell you which converter to use. Test a sample with both before running a batch.

Sort the results into groups: Ali-K, Ali-Web, Dylan, scanned images, and text that is already Unicode but messy. Each group needs a different treatment.

Choosing an Ali-K to Unicode converter

There are good free options now:

  • AsoSoft Library, available for C# and for Python (pip install asosoft, Python 3.8+, MIT licence), with converters for Ali-K, Ali-Web and Dylan plus a normaliser.
  • KurdFont, a web converter with an auto-detect mode for Ali-K, Ali-Web and Dylan.
  • A Firefox extension that converts in both directions and accepts Word, PowerPoint and PDF files by drag and drop.
  • The Kurdish Academy of Language, which offers a tool for converting Ali font text to Unicode.

There is also Kurd.AI, which I founded. It includes an Ali-K to Unicode converter alongside a Kurdish spelling checker and keyboard. It is handy for staff who need to fix a paragraph of non-sensitive text quickly.

The information-security point matters here. Online converters are fine for public text such as news items or published course descriptions. For HR records, student files, medical letters or legal documents, use an offline library on a controlled machine. Uploading a confidential file to any website, however convenient, is a data transfer you need to be able to justify.

Convert run by run, not whole files

A common mistake is to convert the entire document. That damages English, Arabic and numbers that were never in a legacy font. The safer approach is to convert only the text runs set in legacy fonts, then switch those runs to a Unicode font.

Here is a short Python sketch using python-docx and the asosoft package. Treat it as an example. Check the function names against the package README, save old .doc files as .docx first, keep a backup, and always write to a new file.

# Example only: back up first, write to a new file, never overwrite the original.
from docx import Document
from docx.oxml.ns import qn
import asosoft  # pip install asosoft

# Adjust to the exact font names your files show in Word.
LEGACY_HINTS = ("ali_k", "ali-k", "alik")
UNICODE_FONT = "Tahoma"

def cs_font(run):
    rpr = run._element.rPr
    if rpr is not None and rpr.rFonts is not None:
        return rpr.rFonts.get(qn("w:cs")) or run.font.name or ""
    return run.font.name or ""

def convert_runs(paragraphs):
    for para in paragraphs:
        for run in para.runs:
            name = cs_font(run).lower().replace(" ", "_")
            if run.text and any(h in name for h in LEGACY_HINTS):
                run.text = asosoft.AliK2Unicode(run.text)
                run.font.name = UNICODE_FONT
                run._element.rPr.rFonts.set(qn("w:cs"), UNICODE_FONT)

doc = Document("archive/letter-2009.docx")
convert_runs(doc.paragraphs)
for table in doc.tables:
    for row in table.rows:
        for cell in row.cells:
            convert_runs(cell.paragraphs)
doc.save("converted/letter-2009.docx")

This only catches fonts set directly on runs. If your templates set the legacy font in a style, handle the styles too. Tahoma is one of several Windows fonts that display Unicode Kurdish, alongside Arial and Times New Roman. The Bahij Kurdish standard fonts are another option.

Normalise, spell-check and handle scans

Normalise after converting

Conversion is only half the job. AsoSoft's normaliser does four things:

  • It replaces deprecated Arabic presentation forms (FB50–FDFF and FE70–FEFF).
  • It unifies dashes and spaces.
  • It removes control characters.
  • It swaps look-alike letters such as ڪ, ے and ٶ for ک, ی and ؤ.

Run it on converted text and on text that was already Unicode but messy.

Stray zero-width non-joiners deserve attention. They are often left behind by earlier poor conversions and break words in search.

Then choose a house standard and write it down. The main decision is the letter for /h/. The Kurdish keyboard layouts project uses ه (U+0647) rather than ھ (U+06BE), following the KRG Department of Information Technology's standard. Whichever you pick, apply the same rule to stored text and to search queries, or searches will miss.

Spell-check with a person in the loop

KLPT, the Kurdish Language Processing Toolkit, covers preprocessing, tokenisation and spell-checking for Sorani and Kurmanji. Use it to flag likely errors, then have a person review a sample. Typical problems are wrong ڕ or ڵ, missing ێ or ۆ, and words split around zero-width characters.

Scanned paper needs OCR, not a converter

A scanned PDF contains pictures, not text, so no font converter can help. Here the tooling is improving. A new open-source project, Kurdish-OCR, has had its first public release. It offers a REST API built on Laravel and Tesseract 5, with a custom-trained Sorani model.

Be realistic. Accurate Kurdish OCR is still limited, so expect manual correction. Normalise the OCR output, and store the original scan alongside the text as the authoritative record.

Check, sign off and stop new legacy files

Use this table to route each group of files:

Source Tool Watch out for
Ali-K AliK2Unicode Samik and Traditional also exist in Ali-Web; test a sample
Ali-Web AliWeb2Unicode Same font-name overlap with Ali-K
Dylan Dylan2Unicode Confirm font names in the file first
Scanned OCR (Tesseract with a Sorani model) Manual correction; keep the original scan
Already Unicode but messy Normalize Stray zero-width characters, presentation forms, look-alike letters

Before you sign off a batch:

  1. Compare before-and-after samples side by side.
  2. Open converted files on an Android phone, an iPhone and a web browser.
  3. Search for a few known words and confirm they are found.
  4. Spot-check a fixed number of pages per batch and record who checked them.
  5. Confirm originals are backed up and sensitive files never left the controlled machine.

Then close the tap:

  • Install a Unicode Kurdish keyboard and suitable fonts on staff PCs.
  • Replace Word and PowerPoint templates that use Ali fonts.
  • Give staff a one-page guide to typing in Unicode.
  • Validate web forms and databases so Kurdish-only fields flag legacy characters such as ة, ط and ك.

If older web systems need rebuilding or cleaning up as part of this work, my company Standing can help through its web and app development and IT services. The steps above are the same whoever does it.

The takeaway is simple: legacy Kurdish text is invisible to phones, search and AI until it becomes real Unicode. Inventory first, convert only what needs converting, normalise to one written standard, and make sure no new Ali-K files are created tomorrow.

Sources & further reading

  1. AsoSoft Library (C#): Ali-K, Ali-Web and Dylan to Unicode, plus the normalisergithub.com
  2. AsoSoft Library (Python, pip install asosoft)github.com
  3. KurdFont Kurdish Text Converterkurdfont.com
  4. Kurdish keyboard layouts (KRG DIT note on ه)github.com
  5. KLPT, the Kurdish Language Processing Toolkitgithub.com
  6. Kurdish-OCR v1.0.0 (Tesseract 5, Laravel)github.com

🤖 Researched and drafted with AI assistance, guided by my editorial standards. Spotted something wrong? Tell me.

Akam Omer
Written by

Akam Omer

IT leader, engineer and security specialist from Erbil with 20+ years across higher education, telecoms, healthcare and government. Founder of BulkSMSIraq, VerifyWay and Kurd.ai.