-
Couldn't load subscription status.
- Fork 205
Add an upcall point to swift-corelibs-foundation for String encoding conversion #1217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an upcall point to swift-corelibs-foundation for String encoding conversion #1217
Conversation
|
@swift-ci test |
|
Will, of course, need a follow up in swift-corelibs-foundation to replace the function with one that calls into |
|
|
||
| #if !FOUNDATION_FRAMEWORK | ||
| @_spi(SwiftCorelibsFoundation) | ||
| dynamic public func _cfStringEncodingConvert(string: String, using encoding: UInt, allowLossyConversion: Bool) -> Data? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a similar up-call for the bytes --> String direction so that we support decoding as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, done.
|
@swift-ci test |
|
@swift-ci test |
Links: - Issue: swiftlang#1015 - Resolvers: * swiftlang#1217 * swiftlang/swift-corelibs-foundation#5194
Links: - Issue: swiftlang#1015 - Resolvers: * swiftlang#1217 * swiftlang/swift-corelibs-foundation#5194
* [Proposal] Add "String Encoding Names" proposal. This proposal allows `String.Encoding` to be converted to and from various names. For example: ```swift print(String.Encoding.utf8.ianaName!) // Prints "UTF-8" print(String.Encoding(ianaName: "ISO_646.irv:1991") == .ascii) // Prints "true" ``` * Change the link to implementation. * Remove description about #1015 since it is resolved. Links: - Issue: #1015 - Resolvers: * #1217 * swiftlang/swift-corelibs-foundation#5194 * Add a description about already-available ICU string converter.
* [Proposal] Add "String Encoding Names" proposal. This proposal allows `String.Encoding` to be converted to and from various names. For example: ```swift print(String.Encoding.utf8.ianaName!) // Prints "UTF-8" print(String.Encoding(ianaName: "ISO_646.irv:1991") == .ascii) // Prints "true" ``` * Change the link to implementation. * Remove description about #1015 since it is resolved. Links: - Issue: #1015 - Resolvers: * #1217 * swiftlang/swift-corelibs-foundation#5194 * Add a description about already-available ICU string converter. * SF-0033: Add `@available` attributes to sample code. In response to: https://forums.swift.org/t/review-sf-0033-string-encoding-names/81965/7 * SF-0033: Clarify which "case-insensitivity" is used. In response to: https://forums.swift.org/t/review-sf-0033-string-encoding-names/81965/8 * SF-0033: Change FoundationPreview version to 6.3. In response to: #1502 (comment)
Add an upcall to swift-corelibs-foundation for converting String encodings that swift-foundation does not implement.
Partially resolves #1216.