Convert old InPage Urdu documents into modern Unicode text — works fully offline, no internet required, and no data ever leaves your computer.
For developers and advanced users, the application is built in Python and PyQt5 to provide bidirectional conversion between InPage's legacy glyph encoding (CP-1252/custom) and standard Unicode. This paste-based text utility bypasses the need to parse binary .inp files, designed to easily migrate text databases between legacy print layouts and modern web formats.
- Urdu Publishers & Typesetters: Digitizing old InPage books and newspapers into modern digital formats.
- Students & Researchers: Converting legacy InPage thesis files and documents to edit them in modern tools.
- IT Administrators: Migrating legacy office archives to modern content management systems.
- Everyday Users: Anyone who has legacy
.inp-era copied or pasted text that renders as gibberish (e.g., CP-1252 character maps) in Microsoft Word or web browsers.
- 🚀 Download Windows Installer (v1.1.2): Download the standalone setup executable (
InPageUnicodeConverter-Setup-1.1.2.exe) to install the application instantly on Windows (no Python required). - 💻 Build from source (for developers): Follow the instructions below to run the code locally or package it manually.
- Bidirectional Conversion: Seamlessly switch between
InPage → UnicodeandUnicode → InPagemodes. - Raw Clipboard Bypass: Implements native Windows
ctypesclipboard integration to directly read rawCF_TEXTbytes, bypassing lossy Windows ANSI/Unicode conversions that strip critical character markers (such as non-breaking spaces\xa0representing Noon). - Offline-First & Private: Operates 100% locally with zero external network requests, telemetry, or third-party API dependencies.
- Nastaliq Rendering: Bundles Google's Noto Nastaliq Urdu font and configures native Right-to-Left (RTL) reading layout for Unicode output, guaranteeing proper rendering across systems.
- Text Formatting & Punctuation Options:
- Remove Double Spaces: Collapses multiple consecutive spaces into a single space (
remove_double_space). - Word Spacing Adjustment: Automatically adds space after every word for custom typesetting (
add_word_space). - Comma & Number Spacing: Auto-inserts spaces after commas (
,and،) and numeric runs (digits) (add_comma_number_space).
- Remove Double Spaces: Collapses multiple consecutive spaces into a single space (
- Smart Linguistic Processing: Handles complex Urdu orthography rules including Heh-Hamza combinations (ۂ), diacritics residing between base letters and modifiers, Bari Yee contextual forms, digit direction reversal (LTR), and quotation mark handling.
- Direct File Export: Option to save converted output directly to
.txtfiles with appropriate UTF-8 (Unicode) or CP-1252 (legacy InPage ANSI) encodings. - Live Statistics & Validation: Real-time input character count, empty input protection, and heuristic direction checking.
InPageToUnicode/
├── assets/ # Application icon and bundled Noto Nastaliq font
├── mapping/ # Bidirectional glyph mapping tables and core conversion rules
│ └── glyph_map.py
├── src/ # PyQt5 application GUI and raw Windows clipboard integration
│ ├── main.py # Application entry point
│ ├── main_window.py # GUI layout, controls, and event handlers
│ └── clipboard.py # Win32 ctypes raw clipboard API wrapper
├── tests/ # Automated unit and GUI integration test suite
│ ├── test_gui.py # PyQt5 GUI interaction tests
│ └── test_pairs.py # Mapping correctness and linguistic edge-case tests
├── InPageConverter.spec # PyInstaller single-executable build specification
├── inno_setup.iss # Inno Setup 6 installer creation script
├── CODE_DOCUMENTATION.md # Engineering architecture & module specification
├── DESIGN_PHILOSOPHY.md # Architectural trade-offs and design rationale
├── RELEASE_NOTES.md # Full changelog and release history
└── README.md # Project landing page and user guide
- Python 3.8+
- Windows OS (required for
ctypesraw clipboard handling and packaging)
-
Clone the repository:
git clone https://github.com/salmanasmat/InPageToUnicode.git cd InPageToUnicode -
Create and activate a virtual environment:
python -m venv .venv .\.venv\Scripts\Activate.ps1 -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python src/main.py
The codebase includes comprehensive unit and GUI integration tests covering mapping accuracy, digits reversal, Hamza correction, quotation rules, spacing options, and clipboard handling.
To execute the full test suite:
python -m unittest discover -s testsThe application can be compiled into a single executable using PyInstaller. A spec file is provided:
pyinstaller InPageConverter.specThe compiled executable will be generated inside the dist/ directory with all bundled assets (icon, Noto Nastaliq font, mapping module).
An Inno Setup script (inno_setup.iss) is included to generate a standalone Windows installer:
- Ensure Inno Setup 6 is installed on your system.
- Compile the installer:
ISCC.exe inno_setup.iss
The installer executable (InPageUnicodeConverter-Setup-1.1.2.exe) will be generated inside the installer-output/ directory.
- 📖 CODE_DOCUMENTATION.md: Deep dive into application architecture, module breakdowns, data flow sequence diagrams, and API signatures.
- 🎯 DESIGN_PHILOSOPHY.md: Design principles, technical trade-offs, and architectural motivations.
- 📋 RELEASE_NOTES.md: Full release history and changelog.
- 🤝 CONTRIBUTING.md: Guidelines for contributing code, bug fixes, or mappings.
- 📋 MAPPING_REQUIREMENTS.md: Specification of character mapping tables, ligatures, and edge cases.
- 📐 PROJECT_SPEC.md: High-level technical specifications and implementation scope.
- ⚖️ CODE_OF_CONDUCT.md: Community standards and guidelines.
- Text-only Conversion: This application processes plain text only. InPage layout formatting (bold, italics, custom font sizes, text boxes, tables, multi-column pages, and images) is not preserved.
- Encoding Dependability: Accuracy relies on standard InPage glyph mapping conventions. Non-standard font maps or heavily corrupted legacy files may require manual review.
This project is licensed under the GNU General Public License v3 (GPL v3). See the LICENSE file for the full text.
Copyright (C) 2026 Salman Asmat
