textvalue 是:物品名称,申领数量;纸巾,2;铅笔,2;圆珠笔,2;NSUInteger length = [textValue length];
                    while ( [textValue length] != 0) {
                        
                        NSMutableDictionary *sheetDict = [[NSMutableDictionary alloc] initWithCapacity:10];
                        
                        NSInteger locoal =  [textValue rangeOfString:@","].location;
                        NSString *name = [textValue substringToIndex:locoal];
                        NSLog(@"name0 %@", name);//在这打印name是:物品名称
                        [sheetDict setObject:name forKey:@"name"];
                        
                        
                        NSString *temp = [textValue substringFromIndex:locoal+1];
                        textValue = temp;
                        length = [textValue length];
                        locoal = [textValue rangeOfString:@";"].location;
                        NSString *value = [textValue substringToIndex:locoal];
                        NSLog(@"value0 %@", value);//这里打印的value是:申请数量
                        [sheetDict setObject:(NSString *)value forKey:@"value"];
                        NSLog(@"sheetDict00 = %@", sheetDict);
          //这里打印字典里的数据就出现了
                  {
                       name = "\U7269\U54c1\U540d\U79f0";
                  value = "\U7533\U9886\U6570\U91cf";
                   },
不知道是为什么,请大侠指导。谢谢。
                        
                        temp = [textValue substringFromIndex:locoal+1];
                        textValue = temp;
                        NSLog(@"textvalue length =  %d", [textValue length]);
                        
                        [sheetArray addObject:sheetDict];
                        [sheetDict release];
                        
                        NSLog(@"sheetDict0 = %@", sheetDict);
                        NSLog(@"sheetArray0 %@", sheetArray);                        
                    }

解决方案 »

  1.   

    字典里就是这样存储中文的,你像下面这样打印出来就是正确的:   
        NSLog(@"%@",[newDic valueForKey:@"value"]);
      

  2.   

    需要将中文字符显示到uilabel中
    NSString *name  = [dic objectForKey:@"name"];
                        NSString *value  = [dic objectForKey:@"value"];                    
                        UILabel *detailLabel1 = (UILabel *)[cell.contentView viewWithTag:(i*2)];
                        UILabel *detailLabel2 = (UILabel *)[cell.contentView viewWithTag:(i*2 + 1)];
                        
              
             
                        detailLabel1.text = name;//由于这里的name和value值为{
      name = "\U7269\U54c1\U540d\U79f0";
      value = "\U7533\U9886\U6570\U91cf";
      },所以这里label的text是错误的,导致detailLabel1.text 无法正常的设置。请问是为什么?谢谢。
                        detailLabel2.text = value;
      

  3.   

        NSString * name = @"物品名称";
        NSMutableDictionary * newDic = [[NSMutableDictionary alloc]initWithCapacity:10];
        [newDic setObject:name forKey:@"value"];
        lblTitle.text = [newDic objectForKey:@"value"];
        NSLog(@"%@",[newDic objectForKey:@"value"]);
    会有问题吗?我这样做正常的啊