Skip to content

Commit 171d501

Browse files
committed
Add a description about already-available ICU string converter.
1 parent eab21a6 commit 171d501

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Proposals/NNNN-String-Encoding-Names.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,14 @@ This feature can be freely adopted and un-adopted in source code with no deploym
239239

240240
This feature will make more programs easy to parse string encoding names so that (e.g.) Web apps written in Swift won't need to implement such parser on their own.
241241

242+
We already have the string converter in `FoundationInternationalization` that wraps ICU APIs, but that requires IANA Charset Names to create an instance of naive ICU converter[^icu-string-converter].
243+
Once this feature is adopted, it will become easier to implement other string encoding conversions that are unavailable yet.
244+
245+
[^icu-string-converter]: https://github.com/swiftlang/swift-foundation/blob/a8bee5bfc71210168fa1b973fb1a1deb8bde2047/Sources/FoundationInternationalization/ICU/ICU%2BStringConverter.swift#L18-L37
246+
247+
248+
### Longer-term perspective
249+
242250
Hopefully, happening some cascades like below might be expected in the longer term.
243251

244252
- General string decoders/encoders and their protocols (for example, as suggested in "[Unicode Processing APIs](https://forums.swift.org/t/pitch-unicode-processing-apis/69294)") could be implemented.

0 commit comments

Comments
 (0)