docs: static String normalizeUri(String s) {
      int n = s.length();
      boolean colonsIrrelevant = false;
      for (int i = 0; i < n; ++i) {
        char ch = s.charAt(i);
        switch (ch) {
          case '/': case '#': case '?': case ':':
            colonsIrrelevant = true;
            break;
          case '(': case ')':
          case '{': case '}':
            return normalizeUriFrom(s, i, colonsIrrelevant);
          case '\u0589':
          case '\u05c3':
          case '\u2236':
          case '\uff1a':
            if (!colonsIrrelevant) {
              return normalizeUriFrom(s, i, false);
            }
            break;
          default:
            if (ch <= 0x20) {
              return normalizeUriFrom(s, i, false);
            }
            break;
        }
      }
      return s;
    }