code: private static String xSystemToUnicode(String s) {
      String result = "";
      int length = s.length();
  
      for (int i = 0; i < length; i++){
        char c1 = s.charAt(i);
        char c2 = (i + 1 < length) ? s.charAt(i + 1) : ' ';
  
        if (c2 == 'x') {
  
          switch (c1) {
            case 'c': result += 'ĉ'; ++i; break;
            case 'g': result += 'ĝ'; ++i; break;
            case 'h': result += 'ĥ'; ++i; break;
            case 'j': result += 'ĵ'; ++i; break;
            case 's': result += 'ŝ'; ++i; break;
            case 'u': result += 'ŭ'; ++i; break;
  
            default: result += c1; break;
          }
        } else {
          result += c1;
        }
      }
      return result;
    }
docs: into lower case.