uk.me.parabola.imgfmt.app.labelenc
Class TableTransliterator

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.labelenc.TableTransliterator
All Implemented Interfaces:
Transliterator

public class TableTransliterator
extends java.lang.Object
implements Transliterator

A simple transliterator that transliterates character by character based on pre-prepared tables. It is not context sensitive - the same input character always produces the same output character(s), so the results are not very good for languages where that is important. Tables are only read when needed, so for a typical map only a small number of files will actually be read.


Constructor Summary
TableTransliterator(java.lang.String targetCharset)
           
 
Method Summary
 java.lang.String transliterate(java.lang.String s)
          Convert a string into a string that uses only ascii characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableTransliterator

public TableTransliterator(java.lang.String targetCharset)
Method Detail

transliterate

public java.lang.String transliterate(java.lang.String s)
Convert a string into a string that uses only ascii characters.

Specified by:
transliterate in interface Transliterator
Parameters:
s - The original string. It can use any unicode character.
Returns:
A string that uses only ascii characters that is a transcription or transliteration of the original string.