> On Jun 22, 2016, at 12:37 PM, Ben Rimmington <[email protected]> wrote:
> But the cString(using:) method is from Foundation, and using UTF-8 should 
> always succeed in any case.

I suppose you’re right about that, but now it brings up more confusion in my 
mind about what’s in Foundation and what’s in the standard library. So would 
there be extensions on String in (Swift) Foundation that implements 
cString(encoding:)? What decides what functions are in the standard library and 
what are in Foundation?

> UTF-8 by default is probably correct for POSIX APIs, but maybe not for 
> Windows APIs (if code pages are expected).

I guess it all depends on what you think should be valid for C strings. Based 
on the documentation, I guess the core team thinks UTF-8 is valid.

-Kenny


_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to