protected static String canonicalize(String str){
  for (int i=0; i < invalidCharacters.length; i++) {
    str=str.replace(invalidCharacters[i],'_');
  }
  return str;
}

protected static String canonicalize ( String str ) { for ( int i = 0 ; i < invalidCharacters . length ; i ++ ) { str = str . replace ( invalidCharacters [ i ] , '_' ) ; } return str ; }
canonicalizes un - support characters in ldap dn .
