Trasliteration - Conversion of double/triple byte characters to single byte characters for various requirements

I recently came across a document where the requirement was to convert from triple/double byte characters to single byte characters to send it for export complaince check as the export compliance system can accept only single byte characters.
Basically the useful thing about this was they were using IBM ICU project(an open source project) for this process,so in a way making it more open to developers.
These were the pros and cons for IBM identified by them.
- No interface needed (written in Java, integrable in Oracle)
- High level of portability, flexibility and scalability
- No internal maintenance needed (open source project)
- License free (nonrestrictive use with commercial software)
Unicode standardization, converts from/to a lot of other encodings
- Extensive testing will be required.

Basically my purpose of writing this document is to provide you with some terms to google.

Step 1: Write a plsql wrapper to call the java .

create or replace package icu_translit is
function transliterate( p_str varchar2) return varchar2;
pragma restrict_references(transliterate,RNDS, RNPS, WNDS, WNPS);
create or replace package body icu_translit is
function transliterate( p_str varchar2) return varchar2 as
language java name ' return java.lang.String';

Step 2: Write a Java wrapper to call the translit functionality of ICU project


public class transliterator {
    private static Transliterator transInst =Transliterator.createFromRules("MyTranslit", "", Transliterator.FORWARD);
    public static String transliterate(String in) {
        if (in != null)
            return transInst.transliterate(in);
            return "";

check this feature out its really good.

select icu_translit.transliterate('सेन्गुप्त') from dual

User Guide :
Home page of the ICU project: