iOS
编码
[@"带表情的字符串" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]];
URLFragmentAllowedCharacterSet "#%<>[\]^`{|}
URLHostAllowedCharacterSet "#%/<>?@\^`{|}
URLPasswordAllowedCharacterSet "#%/:<>?@[\]^`{|}
URLPathAllowedCharacterSet "#%;<>?[\]^`{|}
URLQueryAllowedCharacterSet "#%<>[\]^`{|}
URLUserAllowedCharacterSet "#%/:<>?@[\]^`
解码
[@"编码过带表情的字符串" stringByRemovingPercentEncoding];
Android
编码
URLEncoder.encode( "带表情的字符串", "UTF-8" );
解码
URLDecoder.decode( "编码过带表情的字符串", "UTF-8" )