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

Tracking issue for owned CString conversions #29157

Closed
alexcrichton opened this Issue Oct 19, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@alexcrichton
Copy link
Member

alexcrichton commented Oct 19, 2015

This is a tracking issue for the into_foo methods being added in #28977. Some possible future questions to consider:

  • Is IntoStringError suitable? Named appropriately? Correct set of accessors? etc.
  • Should be paired with an Into implementation
@Diggsey

This comment has been minimized.

Copy link
Contributor

Diggsey commented Oct 25, 2015

Relatedly, I think the documentation for CString could be improved: it should make it explicit that CStrings do not have or enforce any specific encoding, they are simply null-terminated arbitrary byte sequences.

On the other hand, all of the conversion methods will implicitly assume that it is supposed to contain UTF8 data (an unfortunate decision IMO, but too late to change). It should therefore warn that the default conversions will not necessarily be what is required: users should look to the documentation of the C library they are interfacing with to determine what, if any, encoding is used for its strings.

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Dec 17, 2015

🔔 This issue is now entering its final comment period for stabilization 🔔

@BurntSushi

This comment has been minimized.

Copy link
Member

BurntSushi commented Jan 13, 2016

This looks OK to me. I would like to echo some of @Diggsey's thoughts. In particular, the docs could use improving. e.g., into_string should probably "UTF-8 data" instead of "Unicode data."

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 15, 2016

The libs team discussed this recently and the decision was to stabilize

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 21, 2016

Closed by #30943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.