Skip to main content

Kannada ASCII ↔ Unicode Converter

The Kannada ASCII ↔ Unicode Converter is a Python SDK for transforming older Kannada text written in ASCII characters into the corresponding Unicode Kannada characters required by modern applications and systems. It is designed for migration, archival, document processing, and application workflows where legacy Kannada content needs to be displayed and processed correctly in current environments.

What the SDK does

The package supports:

  • ASCII-style Kannada text to Unicode conversion
  • Unicode Kannada text to ASCII-style output
  • batch-style processing for plain text files
  • DOCX document conversion with preserved paragraph and run structure
  • a simple public API that can be used from scripts, web services, or desktop apps

Why this package exists

Older Kannada text is often stored or exchanged using ASCII-based character representations that were used in legacy systems and documents. This SDK provides a practical bridge between those older ASCII Kannada characters and Unicode, which is the modern standard for correct rendering, storage, and interoperability.

Installation

Install from PyPI:

pip install kannada-ascii-unicode

For local development:

python -m pip install -e .

Quick start

from kannada_converter import KannadaConverter, ascii_to_unicode, unicode_to_ascii

converter = KannadaConverter()

ascii_text = "PÀÄ"
unicode_text = converter.convert_ascii_to_unicode(ascii_text)
print(unicode_text)  # ಕು

print(unicode_to_ascii("ಕು"))  # PÀÄ

Public API

The SDK exposes a small and focused public API:

from kannada_converter import (
    KannadaConverter,
    ascii_to_unicode,
    ascii_to_unicode_file,
    unicode_to_ascii,
    unicode_to_ascii_file,
)

Core class

from kannada_converter import KannadaConverter

converter = KannadaConverter()

String conversion

converter.convert_ascii_to_unicode("PÀ")
converter.convert_unicode_to_ascii("ಕ")

File conversion

converter.convert_ascii_to_unicode_file("input.txt", "output.txt")
converter.convert_unicode_to_ascii_file("input.docx", "output.docx")

If no destination path is provided, the converter will infer one automatically.

File support

Plain text files

The text file path handles UTF-8-compatible input and writes converted output while preserving line breaks and spacing.

DOCX files

The DOCX path uses the same conversion engine for paragraph and run content. It is suitable for converting legacy ASCII-style document content into Unicode and vice versa while retaining the document structure.

Architecture overview

The package is organized into three main layers:

  • Public API: simple entry points for consumers
  • Core engine: conversion logic and special-case handling
  • Mapping data: bundled JSON mappings for ASCII ↔ Unicode rules

The implementation uses a trie-based matching approach for lookup efficiency and a mapping-driven engine for Kannada-specific behavior.

Example workflow

from pathlib import Path
from kannada_converter import KannadaConverter

converter = KannadaConverter()
source = Path("sample.txt")
destination = Path("sample.unicode.txt")
converter.convert_ascii_to_unicode_file(source, destination)

Sample application

A runnable sample app is available in testapp/app.py. It demonstrates both string conversion and DOCX conversion.

Run it with:

python testapp/app.py

Development and testing

Create a virtual environment and install the project in editable mode:

python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -e .
pip install pytest python-docx

Run the test suite:

pytest -q

Documentation

Additional documentation is available in the docs/ folder:

Project structure

Contributing

Contributions are welcome. The recommended flow is:

  1. Update mapping data or conversion logic.
  2. Add or update regression cases in tests/test_cases.json.
  3. Run the test suite.
  4. Open a pull request with a summary of the change.

License

This project is licensed under the MIT License.

Author

Ravikumar Pawar

GitHub: https://github.com/kagapa-blr

Metadata

Release files for kannada-ascii-unicode 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kannada-ascii-unicode 0.1.5
File Size Uploaded Provenance Actions
kannada_ascii_unicode-0.1.5.tar.gz 14.6 kB With provenance Details for kannada_ascii_unicode-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kannada-ascii-unicode 0.1.5
File Interpreter ABI Platform Actions
kannada_ascii_unicode-0.1.5-py3-none-any.whl Python 3 none any Details for kannada_ascii_unicode-0.1.5-py3-none-any.whl

Total release size: 29.4 kB

Release files / kannada_ascii_unicode-0.1.5.tar.gz

Download URL kannada_ascii_unicode-0.1.5.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5a51974948be5886048024bcc25015d232eac5c6d8f292812b590321da2b5b3e
BLAKE2b-256 checksum
How to use checksums
0b8e533a0dd3e8aa054c22520970e1f95b20375933bb35246e32e0bd3e9b288f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

Release files / kannada_ascii_unicode-0.1.5-py3-none-any.whl

Download URL kannada_ascii_unicode-0.1.5-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d208a9a4d4088839624c6ce880f563e408f4b7f0fe05620a792dff1e1ba541a
BLAKE2b-256 checksum
How to use checksums
51532da7f9c326d277d15063a70f3242086725553014842719a519ef034a5a13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

Security for kannada-ascii-unicode 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kannada_ascii_unicode-0.1.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page