Skip to content

Commit b0a8981

Browse files
committed
ICU: Omit encodings that should be supported by FoundationEssentials.
In response to: #1296 (comment)
1 parent 338b2ed commit b0a8981

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Sources/FoundationInternationalization/ICU/ICU+StringConverter.swift

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,19 @@ internal import _FoundationICU
1818
private extension String.Encoding {
1919
var _icuConverterName: String? {
2020
// TODO: Replace this with forthcoming(?) public property such as https://github.com/swiftlang/swift-foundation/pull/1243
21+
// Note: UTF-* and US-ASCII are omitted here because they are supposed to be converted upstream.
2122
switch self {
22-
case .utf8: "UTF-8"
23-
case .ascii: "US-ASCII"
2423
case .japaneseEUC: "EUC-JP"
2524
case .isoLatin1: "ISO-8859-1"
2625
case .shiftJIS: "Shift_JIS"
2726
case .isoLatin2: "ISO-8859-2"
28-
case .unicode: "UTF-16"
2927
case .windowsCP1251: "windows-1251"
3028
case .windowsCP1252: "windows-1252"
3129
case .windowsCP1253: "windows-1253"
3230
case .windowsCP1254: "windows-1254"
3331
case .windowsCP1250: "windows-1250"
3432
case .iso2022JP: "ISO-2022-JP"
3533
case .macOSRoman: "macintosh"
36-
case .utf16BigEndian: "UTF-16BE"
37-
case .utf16LittleEndian: "UTF-16LE"
38-
case .utf32: "UTF-32"
39-
case .utf32BigEndian: "UTF-32BE"
40-
case .utf32LittleEndian: "UTF-32LE"
4134
default: nil
4235
}
4336
}

0 commit comments

Comments
 (0)