code: private static String decodeISO88591Path(String path, int offset, int length) {
          StringBuilder builder = null;
          int end = offset + length;
          for (int i = offset; i < end; i++) {
              char c = path.charAt(i);
              switch (c) {
                  case '%':
                      if (builder == null) {
                          builder = new StringBuilder(path.length());
                          builder.append(path, offset, i - offset);
                      }
                      if ((i + 2) < end) {
                          char u = path.charAt(i + 1);
                          if (u == 'u') {
                              // TODO this is wrong. This is a codepoint not a char
                              builder.append((char) (0xffff & TypeUtils.parseInt(path, i + 2, 4, 16)));
                              i += 5;
                          } else {
                              builder.append((byte) (0xff & (TypeUtils.convertHexDigit(u) * 16 + TypeUtils.convertHexDigit(path.charAt(i + 2)))));
                              i += 2;
                          }
                      } else {
                          throw new IllegalArgumentException();
                      }
  
                      break;
  
                  case ';':
                      if (builder == null) {
                          builder = new StringBuilder(path.length());
                          builder.append(path, offset, i - offset);
                      }
                      while (++i < end) {
                          if (path.charAt(i) == '/') {
                              builder.append('/');
                              break;
                          }
                      }
                      break;
  
  
                  default:
                      if (builder != null)
                          builder.append(c);
                      break;
              }
          }
  
          if (builder != null)
              return builder.toString();
          if (offset == 0 && length == path.length())
              return path;
          return path.substring(offset, end);
      }
docs: /* Decode a URI path and strip parameters of ISO-8859-1 path