# PathBuf to CString

**URL:** <https://internals.rust-lang.org/t/pathbuf-to-cstring/12560>\
**Category:** libs\
**Created:** [June 15, 2020, 11:30am UTC](https://internals.rust-lang.org/t/pathbuf-to-cstring/12560 "2020-06-15T11:30:36Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![kornel](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kornel/32/2711_2.png) [@kornel](https://internals.rust-lang.org/u/kornel)\
**Post date:** [June 23, 2020, 1:28pm UTC](https://internals.rust-lang.org/t/pathbuf-to-cstring/12560/10 "2020-06-23T13:28:44Z")

</div>

WTF-8 is supposed to be an internal representation, not an encoding for interchange. I don't think it's commonly used, so libraries expecting `char *` are very unlikely to make a proper use of it. Windows itself certainly can't. That makes exposing it more of a new feature for Rust rather than compatibility for C, so I'd say it's out of scope for `CString`.

---

_[View the full topic](https://internals.rust-lang.org/t/pathbuf-to-cstring/12560)._
