{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibhjh3yoiqfitnlsaqjuwmanf5vg46ijay4c2xlee4yrjen6uydji",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mmlp7s4sn6o2"
},
"path": "/t/from-text-type-class-to-convert-from-text/14150#post_7",
"publishedAt": "2026-05-24T09:53:29.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"“OsPath is WTF-8/UCS2LE” thing",
"The WTF-8 encoding",
"WTF-8",
"potentially ill-formed UTF-16",
"2295-os-str-pattern - The Rust RFC Book"
],
"textContent": "BurningWitness:\n\n> Can we just do the “OsPath is WTF-8/UCS2LE” thing I proposed two years ago instead of whatever this is?\n\nWTF-8 is used to have a single **internal representation** on both unix and windows. But it also comes with a fair amount of trade-offs, see The WTF-8 encoding\n\n> WTF-8 is a hack intended to be used internally in self-contained systems with components that need to support potentially ill-formed UTF-16 for legacy reasons.\n\nIt is not user facing and has no relevance for public API.\n\nI also personally think it’s a rather poor decision by the rust ecosystem. You can see part of the fallout here: 2295-os-str-pattern - The Rust RFC Book",
"title": "From-text: type class to convert from Text"
}