code: private static String convertSpecialCharacters(StringBuilder idlName)
      {
          for (int i = 0; i < idlName.length(); ++i)
          {
              char c = idlName.charAt(i);
  
              if (c == '$' || c > 255)
              {
                  idlName.replace(i, i + 1, "U");
  
                  String hex = Integer.toHexString(c).toUpperCase();
                  int numHex = hex.length();
                  int numZero = 4 - numHex;
  
                  while (numZero > 0)
                  {
                      idlName.insert(++i, '0');
                      --numZero;
                  }
  
                  idlName.insert(i + 1, hex);
                  i += numHex;
              }
          }
  
          if (idlName.charAt(0) == '_')
          {
              idlName.insert(0, 'J');
          }
  
          return idlName.toString();
      }
docs: Returns a String with the 'mangling' required for idl names that
  contain special characters, including '_', '$', and all characters
  not in Latin-1. <p>
  
  From the CORBA spec: For Java identifiers that contain illegal OMG
  IDL identifier characters such as '$' or Unicode characters outside
  of ISO Latin 1, any such illegal characters are replaced by "U"
  followed by the 4 hexadecimal characters (in upper case) representing
  the Unicode value. So, the Java name a$b is mapped to aU0024b and
  x\u03bCy is mapped to xU03BCy. <p>
  
  For Java names that have leading underscores, the leading underscore
  is replaced with "J_". So _fred is mapped to J_fred. <p>
  
  @param idlName idlName to be converted