- Timestamp:
- Dec 29, 2007, 2:55:43 AM (17 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 2febcae
- Parents:
- 6201646
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
util.c
r6201646 r7b1d048 812 812 } 813 813 } 814 /* Attempts to convert 'in' to ISO-8859-1. Returns that if possible, 815 else returns UTF-8. 816 */ 817 char * owl_get_iso_8859_1_if_possible(char *in) 818 { 819 char *out; 820 if (g_utf8_validate(in, -1, NULL)) { 821 out = g_convert(in, -1, 822 "ISO-8859-1", "UTF-8", 823 NULL, NULL, NULL); 824 if (!out) { 825 out = owl_strdup(in); 826 } 827 } 828 else { 829 out = owl_strdup(""); 830 } 831 return out; 832 } 814 833 815 834 /**************************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.