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

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.labelenc.BaseEncoder
      extended by uk.me.parabola.imgfmt.app.labelenc.Format6Encoder
All Implemented Interfaces:
CharacterEncoder

public class Format6Encoder
extends BaseEncoder
implements CharacterEncoder

Format according to the '6 bit' .img format. The text is first upper cased. Any letter with a diacritic or accent is replaced with its base letter. For example K??rnerstra??e would become KORNERSTRASSE, ????povsk?? would become RIPOVSKA etc. I believe that some Garmin units are only capable of showing uppercase ascii characters, so this will be the default.

Author:
Steve Ratcliffe
See Also:
Garmin IMG File Format

Field Summary
static java.lang.String LETTERS
           
static java.lang.String SYMBOLS
           
 
Fields inherited from class uk.me.parabola.imgfmt.app.labelenc.BaseEncoder
NO_TEXT
 
Constructor Summary
Format6Encoder()
           
 
Method Summary
 EncodedText encodeText(java.lang.String text)
          Encode the text into the 6 bit format.
 
Methods inherited from class uk.me.parabola.imgfmt.app.labelenc.BaseEncoder
isCharsetSupported, isUpperCase, prepareForCharacterSet, setUpperCase, simpleEncode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LETTERS

public static final java.lang.String LETTERS
See Also:
Constant Field Values

SYMBOLS

public static final java.lang.String SYMBOLS
See Also:
Constant Field Values
Constructor Detail

Format6Encoder

public Format6Encoder()
Method Detail

encodeText

public EncodedText encodeText(java.lang.String text)
Encode the text into the 6 bit format. See the class level notes.

Specified by:
encodeText in interface CharacterEncoder
Parameters:
text - The original text, which can contain non-ascii characters.
Returns:
Encoded form of the text. Only uppercase ascii characters and some escape sequences will be present.