我们短信平台想往客户Iphone手机发送ios的表情+文字比如【ios的笑脸】+Happy 2012笑脸该用什么代码表示呢?

解决方案 »

  1.   

    ios短信里面有表情吗?我用的是4.2.1,没有看到短信里面有表情。
      

  2.   

    搜索emoji,发送对应的unicode就可以了
      

  3.   

    获取所有emoji的十六进制以及对应显示,如下:
    http://blog.csdn.net/cxsjabcabc/article/details/7167691
      

  4.   

    http://blog.csdn.net/cxsjabcabc/article/details/7167691
      

  5.   


    不行额,我在我们短信平台输入0xE056,在我IPhone上显示的就是0xE056,没有转变成笑脸符号啊
      

  6.   


    一般的短信平台是不支持发送unicode字符的,但飞信倒是可以
      

  7.   


    这位大哥,你的链接无法显示啊?
    另外弱弱的问下,你的对应编码在飞信里输入发送后,在IPhone上就能显示图标吗?
      

  8.   


    我这里可以打开的。 我把代码贴出来吧:
    # //  
    # //  CCEmoji.m  
    # //  CCFC  
    # //  
    # //  Created by xichen on 11-12-23.  
    # //  Copyright 2011 ccteam. All rights reserved.  
    # //  
    #   
    #   
    # #import "CCEmoji.h"  
    # #import "CCUITextView.h"  
    #   
    #   
    # @implementation CCEmoji  
    #   
    #   
    # // returns a textView that contains nearly all the emojis  
    # + (UITextView *)returnAllEmojiTextView  
    # {  
    #         NSMutableString *s = [[NSMutableString alloc] initWithString:  
    #                                                 @"This is a smiley \ue415 \ue533 face\n"];      
    #   
    #   
    #         // ee8081 ~ ee94b7  
    #         unsigned char str[] = {0xee, 0x80, 0x80, 0};  
    #         unsigned char secondByte[] = {0x80, 0x81, 0x84, 0x85,   
    #                 0x88, 0x89, 0x8c, 0x8d, 0x90, 0x91, 0x94};  
    #         int secondByteLen = sizeof(secondByte) / sizeof(secondByte[0]);  
    #         NSLog(@"secondByteLen is %d", secondByteLen);  
    #         for(int j = 0; j < secondByteLen; ++j)  // get nearly all emoji info  
    #         {  
    #                 str[1] = secondByte[j];  
    #                 if(str[1] == (unsigned char)0x80)  
    #                 {  
    #                         for(int i = 1; i <= (0xbf - 0x80); ++i)  
    #                         {  
    #                                 str[2] += (unsigned char)i;  
    #                                 [s appendFormat:@"0xee%x%x:", (int)str[1], (int)str[2]];  
    #                                 [s appendString:[NSString stringWithUTF8String:(const char *)str]];  
    #                                 [s appendString:@"\r"];  
    #                                 str[2] = 0x80;  
    #                         }  
    #                 }  
    #                 if(str[1] == (unsigned char)0x81)  
    #                 {  
    #                         for(int i = 0; i <= (0x9a - 0x80); ++i)  
    #                         {  
    #                                 str[2] += (unsigned char)i;  
    #                                 [s appendFormat:@"0xee%x%x:", str[1], str[2]];  
    #                                 [s appendString:[NSString stringWithUTF8String:(const char *)str]];  
    #                                 [s appendString:@"\r"];  
    #                                 str[2] = 0x80;  
    #                         }  
    #                 }  
    #                 if(str[1] == (unsigned char)0x84   
    #                    || str[1] == (unsigned char)0x8c   
    #                    || str[1] == (unsigned char)0x90)  
    #                 {  
    #                         for(int i = 1; i <= (0xbf - 0x80); ++i)  
    #                         {  
    #                                 str[2] += (unsigned char)i;  
    #                                 [s appendFormat:@"0xee%x%x:", str[1], str[2]];  
    #                                 [s appendString:[NSString stringWithUTF8String:(const char *)str]];  
    #                                 [s appendString:@"\r"];  
    #                                 str[2] = 0x80;  
    #                         }  
    #                 }  
    #                 if(str[1] == (unsigned char)0x85)  
    #                 {  
    #                         for(int i = 0; i <= (0x9a - 0x80); ++i)  
    #                         {  
    #                                 str[2] += (unsigned char)i;  
    #                                 [s appendFormat:@"0xee%x%x:", str[1], str[2]];  
    #                                 [s appendString:[NSString stringWithUTF8String:(const char *)str]];  
    #                                 [s appendString:@"\r"];  
    #                                 str[2] = 0x80;  
    #                         }  
    #                 }  
    #                 if(str[1] == (unsigned char)0x88)  
    #                 {  
    #                         for(int i = 1; i <= (0xbf - 0x80); ++i)  
    #                         {  
    #                                 str[2] += (unsigned char)i;  
    #                                 [s appendFormat:@"0xee%x%x:", str[1], str[2]];  
    #                                 [s appendString:[NSString stringWithUTF8String:(const char *)str]];  
    #                                 [s appendString:@"\r"];  
    #                                 str[2] = 0x80;  
    #                         }  
    #                 }  
    #                   
    #                 if(str[1] == (unsigned char)0x89)  
    #                 {  
    #                         for(int i = 0; i <= (0x93 - 0x80); ++i)  
    #                         {  
    #                                 str[2] += (unsigned char)i;  
    #                                 [s appendFormat:@"0xee%x%x:", str[1], str[2]];  
    #                                 [s appendString:[NSString stringWithUTF8String:(const char *)str]];  
    #                                 [s appendString:@"\r"];  
    #                                 str[2] = 0x80;  
    #                         }  
    #                 }  
    #                   
    #                 if(str[1] == (unsigned char)0x8d)  
    #                 {  
    #                         for(int i = 0; i <= (0x8d - 0x80); ++i)  
    #                         {  
    #                                 str[2] += (unsigned char)i;  
    #                                 [s appendFormat:@"0xee%x%x:", str[1], str[2]];  
    #                                 [s appendString:[NSString stringWithUTF8String:(const char *)str]];  
    #                                 [s appendString:@"\r"];  
    #                                 str[2] = 0x80;  
    #                         }  
    #                 }  
    #                   
    #                 if(str[1] == (unsigned char)0x91)  
    #                 {  
    #                         for(int i = 0; i <= (0x8c - 0x80); ++i)  
    #                         {  
    #                                 str[2] += (unsigned char)i;  
    #                                 [s appendFormat:@"0xee%x%x:", str[1], str[2]];  
    #                                 [s appendString:[NSString stringWithUTF8String:(const char *)str]];  
    #                                 [s appendString:@"\r"];  
    #                                 str[2] = 0x80;  
    #                         }  
    #                 }  
    #                   
    #                 if(str[1] == (unsigned char)0x94)  
    #                 {  
    #                         for(int i = 1; i <= (0xb7 - 0x80); ++i)  
    #                         {  
    #                                 str[2] += (unsigned char)i;  
    #                                 [s appendFormat:@"0xee%x%x:", (int)str[1], (int)str[2]];  
    #                                 [s appendString:[NSString stringWithUTF8String:(const char *)str]];  
    #                                 [s appendString:@"\r"];  
    #                                 str[2] = 0x80;  
    #                         }  
    #                 }  
    #         }  
    #           
    #         UITextView *textView = [UITextView createCommonTextView:CGRectMake(0, 60, 320, 260)  
    #                                                                                                    withText:s];  
    #         [s release];  
    #         return textView;  
    # }  
    #   
    #   
    # @end你说的在飞信里输入发送什么意思? 飞信必须有emoji,发送给iphone, iphone才能正常显示的。