Releases: swift-standards/swift-whatwg-url-encoding
Releases · swift-standards/swift-whatwg-url-encoding
0.1.0
WHATWG URL Encoding v0.1.0
Initial release of swift-whatwg-url-encoding, implementing the WHATWG URL Standard for application/x-www-form-urlencoded encoding.
Features
- serialize() - Convert name-value pairs to URL-encoded string
- parse() - Parse URL-encoded string to name-value pairs
- percentEncode() - WHATWG-compliant percent encoding (space →
+) - percentDecode() - Handles
+as space and UTF-8 multi-byte characters - Character set - Only alphanumeric +
*-._left unencoded - UTF-8 support - Proper handling of multi-byte characters
- Swift 6.0 - Full strict concurrency support
Differences from Foundation
- Space encoding:
+(WHATWG) vs%20(Foundation) - Character set: Strict WHATWG compliance vs Foundation's permissive encoding
- Specification: Exact implementation of WHATWG URL Living Standard
Requirements
- Swift 6.0+
- macOS 14.0+, iOS 17.0+, tvOS 17.0+, watchOS 10.0+
Reference
WHATWG URL Living Standard - application/x-www-form-urlencoded