Does a mapping exist in the standard library between the String.Encoding enumeration and the standard IANA character set names, e.g., "UTF-8" for String.Encoding.utf8? I was not able to find one.
I'm aware that Foundation's CFStringEncoding can be mapped to IANA character set names, but I could not find a way to go from String.Encoding to CFStringEncoding. CFStringEncoding is just a type alias for UInt32, and the String.Encoding enumeration is backed by a UInt, but unless I've made some simple error, they do not seem to correspond.