Closed Frizlab closed 8 hours ago
I've merged the fix to main
. As a workaround for now on Linux, you can use .ascii
instead of .nonLossyASCII
- decoding bytes with ASCII is always considered lossy, nonLossyASCII
only has different effects when converting a string to bytes
The following code returns
nil
with Swift 6.0 and Swift 6.0-snapshot-2024-09-17 on Linux, but returns the proper String on macOS:String(data: Data(#"yolo"#.utf8), encoding: .nonLossyASCII)
. I believe macOS is in the right.