Skip to content

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

License

Notifications You must be signed in to change notification settings

grzegorzblaszczyk/transcoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages