使用utf8编码编码法语字符串eg.éá并发送为nsdictionary

时间:2015-01-12 17:24:17

标签: ios encoding

我有一个Frech字符串éá我转换为可读字符串UTF8encoding但是在将字符串存储为NSDictionary并发送到Webservice之后它再次转换为\ U00e9ti \ U00eb \ U00f4类特殊字符?

const char *command1 = [event.eventContactName cStringUsingEncoding:NSUTF8StringEncoding];
NSString *str = [NSString stringWithCString:command1 encoding:NSUTF8StringEncoding];

NSArray * rootObjects = [NSArray arrayWithObjects:event.language, [hardware platform], [hardware resolutionString], [[UIDevice currentDevice] systemVersion], uuid, LINKMOBILE_VERSION, [[NSNumber numberWithInt:[[NSDate date] timeIntervalSince1970]] stringValue], event.net, event.geo, event.userName, event.password, event.nbcall, event.longitude, event.latitude, event.shpId, event.eventFam, event.eventCode, event.eventNat, event.eventCountry, event.eventLoc, event.eventDate, event.eventTime, eventTxt, eventTxt1, doc, nil];

root =     {
        dev = "iPhone5,4";
        document =         (
        );
        evtcod = ARR;
        evtctname = "";
        evtctry = AF;
        evtdate = 20150112;
        evtfam = T;
        evtloc = hhg;
        evtnat = A;
        evttime = "15:11:56";
        evttxt = "\U00c8\U00e0";
        geo = "United Kingdom";
        gpslat = "37.787359";
        gpslon = "-122.408227";
        lang = EN;
        login = mgouache;
        nbcall = 1;
        net = wifi;
        os = "7.1.1";
        pwd = isobar;
        res = 640x1136;
        shp = "12900/62/410829";
        ttp = 1421055743;
        uuid = "15098C22-96A6-48C7-A2E1-E214FEA3CDD1";
        ver = "2.0.0";
    };

0 个答案:

没有答案