Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for owned CString conversions #29157
Comments
alexcrichton
added
T-libs
B-unstable
labels
Oct 19, 2015
This comment has been minimized.
This comment has been minimized.
|
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
added
the
I-nominated
label
Dec 16, 2015
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
added
final-comment-period
and removed
I-nominated
labels
Dec 17, 2015
This comment has been minimized.
This comment has been minimized.
|
This looks OK to me. I would like to echo some of @Diggsey's thoughts. In particular, the docs could use improving. e.g., |
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this recently and the decision was to stabilize |
This comment has been minimized.
This comment has been minimized.
|
Closed by #30943 |
alexcrichton commentedOct 19, 2015
This is a tracking issue for the
into_foomethods being added in #28977. Some possible future questions to consider:IntoStringErrorsuitable? Named appropriately? Correct set of accessors? etc.Intoimplementation