- Timestamp:
- 2005-12-31T20:29:15Z (19 years ago)
- Branches:
- master
- Children:
- 39cc341
- Parents:
- c88999c
- Location:
- protocols
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
rc88999c ra252c1a 1856 1856 xmlnode_insert_cdata(y, "away", -1); 1857 1857 y = xmlnode_insert_tag(x, "status"); 1858 { 1859 char *utf8 = str_to_utf8(message); 1860 xmlnode_insert_cdata(y, utf8, -1); 1861 g_free(utf8); 1862 } 1858 xmlnode_insert_cdata(y, message, -1); 1863 1859 gc->away = ""; 1864 1860 } else { -
protocols/nogaim.h
rc88999c ra252c1a 291 291 292 292 /* util.c */ 293 G_MODULE_EXPORT char *utf8_to_str( const char *in );294 G_MODULE_EXPORT char *str_to_utf8( const char *in );295 293 G_MODULE_EXPORT void strip_linefeed( gchar *text ); 296 294 G_MODULE_EXPORT char *add_cr( char *text ); … … 299 297 G_MODULE_EXPORT time_t get_time( int year, int month, int day, int hour, int min, int sec ); 300 298 G_MODULE_EXPORT void strip_html( char *msg ); 301 G_MODULE_EXPORT char * escape_html(const char *html);299 G_MODULE_EXPORT char *escape_html( const char *html ); 302 300 G_MODULE_EXPORT void info_string_append(GString *str, char *newline, char *name, char *value); 303 301 -
protocols/yahoo/yahoo_util.c
rc88999c ra252c1a 50 50 51 51 return new_string; 52 }53 54 char * y_str_to_utf8(const char *in)55 {56 unsigned int n, i = 0;57 char *result = NULL;58 59 if(in == NULL || *in == '\0')60 return "";61 62 result = y_new(char, strlen(in) * 2 + 1);63 64 /* convert a string to UTF-8 Format */65 for (n = 0; n < strlen(in); n++) {66 unsigned char c = (unsigned char)in[n];67 68 if (c < 128) {69 result[i++] = (char) c;70 } else {71 result[i++] = (char) ((c >> 6) | 192);72 result[i++] = (char) ((c & 63) | 128);73 }74 }75 result[i] = '\0';76 return result;77 }78 79 char * y_utf8_to_str(const char *in)80 {81 int i = 0;82 unsigned int n;83 char *result = NULL;84 85 if(in == NULL || *in == '\0')86 return "";87 88 result = y_new(char, strlen(in) + 1);89 90 /* convert a string from UTF-8 Format */91 for (n = 0; n < strlen(in); n++) {92 unsigned char c = in[n];93 94 if (c < 128) {95 result[i++] = (char) c;96 } else {97 result[i++] = (c << 6) | (in[++n] & 63);98 }99 }100 result[i] = '\0';101 return result;102 52 } 103 53
Note: See TracChangeset
for help on using the changeset viewer.