Skip to main content
24/7ATM

Sinhala X256 -

The community behind Sinhala x256 is already discussing x512—a 9-bit table (512 glyphs) that would cover 99.8% of all Sinhala text in modern usage, including rare Pali and Sanskrit loanwords. However, x512 would require 14-bit addressing in some contexts, breaking backwards compatibility with 8-bit display controllers. For now, x256 strikes the optimal balance between coverage and universality.

  • Validation utility: check if text conforms to expected normalization and uses only mapped sequences when producing x256 output.
  • Example pseudocode for conversion (Unicode to x256):
    normalize(input) -> n
    for each token in n:
      if token in x256_map:
        emit x256_map[token]
      else:
        emit escape_prefix + utf8_bytes(token)
    
  • Problem: Without proper shaping, line breaks may occur inside an Akshara (e.g., breaking "ක්ෂ" into two lines). Solution: The x256 spec mandates that each pre-shaped cluster must be treated as a single grapheme cluster. Ensure your line-breaking library respects U+200D (ZWJ) and U+200C (ZWNJ) within x256 blocks. sinhala x256