
Reply:
Reply:
[NSString stringWithCString: string encoding: NSASCIIStringEncoding];
Do not jump to conclusions
Reply:
+ (Id) stringWithCString: (const char *) cString encoding: (NSStringEncoding) enc;
Also, there is a static method, it is best not to have been alloc
Reply:
My TCHAR is char. NSString playing out now with all garbled. Is not the first turn into unichar, then turn into UTF8char? Or something, I used the method you said, or garbled.
Reply:
iphone certainly support the Chinese, but not defined in this NSString enumeration values, we can get this through two methods of enumeration values
The first method is by CFStringConvertEncodingToNSStringEncoding
For example: NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding (kCFStringEncodingGB_18030_2000);
NSString * str2 = [NSString stringWithCString: str1 encoding: enc];
All of kCFStringEncoding defined reference CFStringEncodingExt.h
Also useful are CFStringConvertIANACharSetNameToEncoding
Reply:
Reply:
Class website design and production thesis
Such masters thesis how to write about my mailbox wwwyecao@163.com
Reply:
Class website design and production thesis
Reply:
UTF-8 is sometimes difficult ah
Reply:
Reply:
Reply:
Reply:
Concerned about the topics discussed
Reply:
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
Reply:
Reply:
Reply:
Reply:
Reply:
Concerned about the topics discussed
Reply:
Blackberry is not fun.
Reply:
Reply:
trety
Reply:
Niu ah good
Reply:
Reply:
Reply:
NSString stringWithCString: string encoding: NSASCIIStringEncoding];
Reply:
NSURL * url = [NSURL URLWithString: urlStr];
NSData * data = [NSData dataWithContentsOfURL: url];
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding (kCFStringEncodingGB_18030_2000);
NSString * retStr = [[NSString alloc] initWithData: data encoding: enc];
Baidu, the landlord try
Reply:
Reply:
Too complicated! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! Learn again
Reply:
Reply:
Reply:
Learning, new arrival, waiting for experts to solve
Reply:
Yes, high
Reply:
Yes, high
Reply:
Hahaha reports
Reply:
NSString stringWithCString: string encoding: NSASCIIStringEncoding];
/ * Char or NSString change * /
char a [] = [NSString UTF8String];
NSString = [[NSString alloc] initWithUTF8String: a]
/ * Gb2312 or utf8 chare * /
Reply:
IOS developers recommend a good text http://blog.csdn.net/iukey/article/details/7083165
Reply:
http://blog.csdn.net/iukey/article/details/7083165
No comments:
Post a Comment