开发者

using NSString + stringWithContentsOfFile:usedEncoding:error:

I've got problem with use + stringWithContentsOfFile:usedEncoding:error:

My problem in usedEncoding:(NSStringEncoding *)enc I don't know how can i set pointer to encoding. If i make it - programm is fail.

For example, in similar function we have encoding:(NSStringEncoding)enc - without pointer!

I want loading file开发者_如何学Python (file has encoding ISOLatin1) in NSString and use NSString as UTF8String.

how can i make it ?

thanks.


NSStringEncoding encoding;
NSError* error;
NSString* myString = [NSString stringWithContentsOfFile:myFilePath usedEncoding:&encoding error:&error];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜