comparison src/os_mac_conv.c @ 1212:e085b0f7b036

updated for version 7.1b
author vimboss
date Thu, 10 May 2007 18:07:50 +0000
parents f0d0d3d3a1e2
children 82b5078be2dd
comparison
equal deleted inserted replaced
1211:fcab52418a9d 1212:e085b0f7b036
72 72
73 if(cfstr == NULL) 73 if(cfstr == NULL)
74 fprintf(stderr, "Encoding failed\n"); 74 fprintf(stderr, "Encoding failed\n");
75 /* When conversion failed, try excluding bytes from the end, helps when 75 /* When conversion failed, try excluding bytes from the end, helps when
76 * there is an incomplete byte sequence. Only do up to 6 bytes to avoid 76 * there is an incomplete byte sequence. Only do up to 6 bytes to avoid
77 * looping a long time when there really is something unconvertable. */ 77 * looping a long time when there really is something unconvertible. */
78 while (cfstr == NULL && unconvlenp != NULL && len > 1 && *unconvlenp < 6) 78 while (cfstr == NULL && unconvlenp != NULL && len > 1 && *unconvlenp < 6)
79 { 79 {
80 --len; 80 --len;
81 ++*unconvlenp; 81 ++*unconvlenp;
82 cfstr = CFStringCreateWithBytes(NULL, ptr, len, from, 0); 82 cfstr = CFStringCreateWithBytes(NULL, ptr, len, from, 0);