GitHunt
GR

A set of transcoders (i.e. Latin, umlauts & Cyrillic) and decoders (i.e. Polish letters to Latin)

Build Status

README

Transcoder

Transcoder is a set of simple Java classes ready to use. These classes are meant to be reused in other applications, so they are POJOs without any state or persistence involved.

You can decode UTF-8 strings to Latin characters in:

  • Polish
  • Russian
  • Ukrainian
  • Romanian
  • German
  • Spanish
  • French
  • Czech
  • Slovak
  • Slovenian
  • Icelandic

and transcode UTF-8 characters to HTML entities and HTML entities back to UTF-8 characters in:

  • Russian
  • Ukrainian
  • Romanian
  • Polish
  • German
  • Spanish
  • French
  • Slovak
  • Slovenian
  • Icelandic

EXAMPLE

import gbc.i18n.pl.PolishTranscoder;
public class SimpleExample {

  /**
   * Showcase
   * @param args
   */
  public static void main(String[] args) {

    // START SNIPPET: usage

    // Polish
    PolishTranscoder polish = new PolishTranscoder();
    System.out.println(polish.decode("Pchnąć w tę łódź jeża lub ośm skrzyń fig")); // result: Pchnac w te lodz jeza lub osm skrzyn fig
    System.out.println(polish.fromNativeToEntities("Pchnąć w tę łódź jeża lub ośm skrzyń fig")); // result: Pchnąć w tę łódź jeża lub ośm skrzyń fig
    System.out.println(polish.fromEntitiesToNative("Pchnąć w tę łódź jeża lub ośm skrzyń fig")); // result: Pchnąć w tę łódź jeża lub ośm skrzyń fig
   }
}

LICENSE

The transcoder library is licensed under MIT license.

Languages

Java99.5%Shell0.3%Batchfile0.3%

Contributors

MIT License
Created April 10, 2009
Updated January 31, 2020
grzegorzblaszczyk/transcoder | GitHunt