Hello, I am trying to contribute to open source software for the first time and saw that in NSString.swift, a convenience initializer was not implemented so I decided to work on it.
The initializer is: public convenience init(contentsOf url:URL, usedEncoding enc: UnsafeMutablePointer<UInt>?) throws I don't understand why we need the usedEncoding parameter? I understand that it's a pointer but how do we decide what encoding to use? Do we default to NSUTF8StringEncoding? According to documentation: Upon return, if url is read successfully, contains the encoding used to interpret the data. For possible values, see NSStringEncoding. My understanding is that the url would not be readable without knowing the encoding to be applied? What do you guys think? -Mohit
_______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users