Myanmar (Burmese) has its own script and is Unicode-supported.

Many people use a non-Unicode-compliant font called Zawgyi to enter data into systems. Fortunately, there are several scripts to detect and convert Zawgyi text into Unicode.

Open Fonts

This Google Code page contains several fonts including both Unicode-compatible and Zawgyi Myanmar text.

Google Noto contains a font for Unicode-compatible Myanmar text.

Checking accuracy

Some diacritics appear on the left of the character that they modify. You should see the capital of Myanmar, နေပြည်တော် start with a diacritic ေ which looks like the number 6. It should not place the န first.

Detecting non-Unicode input

The knayi-myscript module for NodeJS can detect most Zawgyi text. It’s easier to detect Zawgyi when there is a larger string of text.

Converting to and from Unicode

There are solutions available to convert between the two text formats. The most common and up-to-date package is usually Rabbit Converter, which is available in many programming languages.

NodeJS

Rabbit Converter is available as the ‘rabbit-node’ module.

knayi-myscript is a Node module which can detect and convert between Unicode and Zawgyi.

The knayi-cli command line tool, based on knayi-myscript, can be used to convert Zawgyi text files to Unicode. Any Unicode-compatible text is left unchanged.

PHP

Rabbit Converter for PHP is the most up-to-date of several PHP libraries.

iOS

Unicode Zawgyi Converter for iOS and Mac OSX

Swift

Rabbit Converter for Swift.

Objective C

Rabbit Converter for Objective C.

Ruby

Rabbit Converter is available as the ‘rabbit-mm’ gem.

Elixir

Rabbit Converter by Arkar Aung.

Sorting Myanmar text

Depending on your programming language, you may need a collator library to sort text according to Myanmar language rules.

In JavaScript, you can use the myanmar-names-js library to sort a list of words or names (ignoring common prefixes, to sort by name).

Numbers

In JavaScript, you can use the myanmar-numbers-js library to convert between Arabic numerals, Myanmar numerals, and numerals used in Shan state.