IRI to URI Conversion
Summary
Implement conversion between IRI and URI formats.
Requirements
- toUri() - Convert IRI to URI (percent-encode non-ASCII)
- toIri() - Convert URI to IRI (decode when safe)
- Handle Punycode for domain names
- Preserve semantic equivalence
Example
// IRI with Japanese characters
const iri = try uri.parse("https://example.com/パス");
const uri_str = try iri.toUri(allocator);
// Result: "https://example.com/%E3%83%91%E3%82%B9"Acceptance Criteria
- Round-trip conversion preserves meaning
- Proper UTF-8 encoding/decoding
- Tests with various scripts (CJK, Arabic, etc.)