1 diff -urN libgphoto2-2.3.1/camlibs/ptp2/ptp-pack.c libgphoto2-2.3.1.new/camlibs/ptp2/ptp-pack.c
2 --- libgphoto2-2.3.1/camlibs/ptp2/ptp-pack.c 2006-12-24 16:16:20.000000000 +0100
3 +++ libgphoto2-2.3.1.new/camlibs/ptp2/ptp-pack.c 2007-02-28 00:17:17.000000000 +0100
5 nconv = iconv (params->cd_ucs2_to_locale, &stringp, &convlen, &locp, &convmax);
6 /* FIXME: handle size errors */
7 loclstr[PTP_MAXSTRLEN*3] = '\0';
8 - if (nconv == (size_t) -1)
10 + if (nconv == (size_t) -1) {
12 + /* try the old way, in case iconv is broken */
13 + for (i=0;i<loclen;i++) {
17 + loclstr[i] = string[i];
21 return strdup(loclstr);