Hmm. This does mean that String.Encoding(ianaName: "shift_jis".uppercased()) will return nil if the locale is Turkish or Azeri, as will String.Encoding(ianaName: "GB2312") (note the fullwidth characters). Nobody is likely to write these literals in Swift code, of course, but these situations could arise from processing user input.
Seems like a good tradeoff, but worth documenting explicitly.