Parsing and validation of URIs (RFC 3896) and IRIs (RFC 3987)