Skip to content

[Proposal] Add "String Encoding Names" proposal. #1243

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YOCKOW
Copy link
Member

@YOCKOW YOCKOW commented Apr 8, 2025

This proposal allows String.Encoding to be converted to and from various names.

For example:

print(String.Encoding.utf8.ianaName!) // Prints "UTF-8"
print(String.Encoding(ianaName: "ISO_646.irv:1991") == .ascii) // Prints "true"

@YOCKOW YOCKOW requested a review from itingliu April 8, 2025 06:50
@YOCKOW YOCKOW added the proposal This PR is for a proposal label Apr 8, 2025
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"
```
@YOCKOW YOCKOW force-pushed the StringEncodingNames/proposal branch from fe0e03c to 723256c Compare April 18, 2025 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This PR is for a proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant