NSString object initialized by reading data from a given URL and returns by reference the encoding used to interpret the data.
- iOS 2.0+
- macOS 10.4+
- tvOS 9.0+
- watchOS 2.0+
The URL from which to read data.
Upon return, if
urlis read successfully, contains the encoding used to interpret the data. For possible values, see
If an error occurs, upon returns contains an
NSErrorobject that describes the problem. If you are not interested in possible errors, pass in
NSString object initialized by reading data from
url can’t be opened or the encoding cannot be determined, returns
nil. The returned initialized object might be different from the original receiver
To read data with an unknown encoding, pass
0 as the
enc parameter as in: