Skip to content
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

Implement Encoding on String #2185

Open
b-n opened this issue Sep 21, 2022 · 4 comments
Open

Implement Encoding on String #2185

b-n opened this issue Sep 21, 2022 · 4 comments
Labels
A-ruby-core Area: Ruby Core types. A-ruby-stdlib Area: Ruby Standard Library packages. B-mruby Backend: Implementation of artichoke-core using mruby. C-enhancement Category: New feature or request. E-medium Call for participation: Experience needed to fix: Medium / intermediate.

Comments

@b-n
Copy link
Member

b-n commented Sep 21, 2022

This appears to still be hanging over from mruby days (after looking at some of the comments, mruby was UTF-8 only).

Some examples:

At present, this makes writing tests for things like Time#strftime impossible for non UTF-8 encodings, as mentioned here: #2182 (comment)

@b-n b-n added C-enhancement Category: New feature or request. A-ruby-core Area: Ruby Core types. A-ruby-stdlib Area: Ruby Standard Library packages. B-mruby Backend: Implementation of artichoke-core using mruby. labels Sep 21, 2022
@b-n
Copy link
Member Author

b-n commented Sep 21, 2022

@lopopolo - Thoughts on difficulty? Medium?

@lopopolo
Copy link
Member

Medium sounds right. We'll probably want to implement the Ruby-side encoding enum for all possible MRI encodings and have a TryFrom to go into spinoso string encoding.

@lopopolo
Copy link
Member

Link:

I think this is implemented in spinoso string but needs to be wired up in Artichoke backend.

@lopopolo
Copy link
Member

Link:

The approach has significantly changed since this ticket got cut. I think the intent here is full encoding parity with MRI, which is why encoding_rs is mentioned.

Out of scope for this ticket.

@b-n b-n added the E-medium Call for participation: Experience needed to fix: Medium / intermediate. label Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ruby-core Area: Ruby Core types. A-ruby-stdlib Area: Ruby Standard Library packages. B-mruby Backend: Implementation of artichoke-core using mruby. C-enhancement Category: New feature or request. E-medium Call for participation: Experience needed to fix: Medium / intermediate.
Development

No branches or pull requests

2 participants