Skip to content

Commit c1aaef5

Browse files
authored
Merge pull request #2503 from gmittert/WindowsIsntIconic
Remove Verification of UTF32 XML on Windows
2 parents fd145c0 + ab44a0c commit c1aaef5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

TestFoundation/TestXMLParser.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ class TestXMLParser : XCTestCase {
118118
// If th <?xml header isn't present, any non-UTF8 encodings fail. This appears to be libxml2 behavior.
119119
// These don't work, it may just be an issue with the `encoding=xxx`.
120120
// - .nextstep, .utf32LittleEndian
121-
let encodings: [String.Encoding] = [.utf16LittleEndian, .utf16BigEndian, .utf32BigEndian, .ascii]
121+
var encodings: [String.Encoding] = [.utf16LittleEndian, .utf16BigEndian, .ascii]
122+
#if !os(Windows)
123+
// libxml requires iconv support for UTF32
124+
encodings.append(.utf32BigEndian)
125+
#endif
122126
for encoding in encodings {
123127
let xml = TestXMLParser.xmlUnderTest(encoding: encoding)
124128
let parser = XMLParser(data: xml.data(using: encoding)!)

0 commit comments

Comments
 (0)