From: Raphaƫl Droz Date: Wed, 19 Dec 2012 01:55:28 +0000 (+0100) Subject: ldif: removed ldif_fix_string() X-Git-Tag: upstream/0.6.1~2^2~28 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;ds=sidebyside;h=29712efb58a9520824b4b0d7d1b9b9e2d1f59694;hp=d9aefd47c40fb87a44acf7625b1599f72e066bce;p=pkg%2Fabook.git ldif: removed ldif_fix_string() WARNING: this will change the default output file encoding when importing a LDIF input! - An LDIF input of UTF-8 entries is base64-encoded (RFC) str_parse_line() already supports that pretty well. - But ldif_fix_string(), present since the initial CVS revision of abook, forces the conversion of utf-8 wide-chars to latin1. - And that's why iconv exists => so let's drop it unless someone complains for a good reason. --- diff --git a/filter.c b/filter.c index c8b3d9e..ecbcfd9 100644 --- a/filter.c +++ b/filter.c @@ -503,8 +503,6 @@ export_file(char filtname[FILTNAME_LEN], char *filename) #include "ldif.h" -static void ldif_fix_string(char *str); - /* During LDIF import we need more fields than the ITEM_FIELDS of a *list_item. Eg: "objectclass" to test valid records, ... @@ -789,8 +787,6 @@ ldif_parse_file(FILE *handle) continue; /* just skip the errors */ } - ldif_fix_string(value); - ldif_convert(item, type, value); xfree(line); @@ -802,19 +798,6 @@ ldif_parse_file(FILE *handle) return 0; } -static void -ldif_fix_string(char *str) -{ - int i, j; - - for(i = 0, j = 0; j < (int)strlen(str); i++, j++) - str[i] = ( str[j] == (char)0xc3 ? - (char) str[++j] + (char) 0x40 : - str[j] ); - - str[i] = 0; -} - /* * end of ldif import */