Wednesday, December 4, 2013

[Ios] how the character encoding inflicted iso-8859-1

Company data is accepted by the server ios-8859-1 encoded
In the iphone does not seem to be how to do this format can be converted to ios-8859-1 encoding
Seeking help heroes!
Reply:
Try NSISOLatin1StringEncoding
Reply:
IOS seemingly no such encoding. . . You need to own to resolve the encoding format
Reply:
reference to the second floor of the reply:
IOS seemingly no such encoding. . . You need to resolve their own coding format of
Gaoshoubangbangmang that how to solve ah ah!
Reply:
Have this encoding format:

kCFStringEncodingISOLatin1 = 0x0201, / * ISO 8859-1 * /

Then under the Code can be converted with CFStringConvertEncodingToNSStringEncoding.

The landlord can refer to:
https://github.com/cxsjabc/iphone-common-codes-ccteam

In the CCEncoding.m achieved.
Reply:
cxsjabcabc thank you thank you very much! Quote posted a few weeks, and finally get it! (
Sun drying Code:
+ (Const char *) UnicodeToISO88591: (NSString *) src
{
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding (kCFStringEncodingISOLatin1);
return [src cStringUsingEncoding: enc];
}

No comments:

Post a Comment