Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 282637
Collapse All | Expand All

(-)chardet.c.orig (-4 / +2 lines)
Lines 66-76 Link Here
66
    if (dfa_validate_utf8(str, strlen(str)))
66
    if (dfa_validate_utf8(str, strlen(str)))
67
        return g_strdup(str);
67
        return g_strdup(str);
68
68
69
#  ifdef HAVE_UDET
70
    /* chardet encoding detector */
69
    /* chardet encoding detector */
71
    if ((out_str = chardet_to_utf8(str, strlen(str), NULL, NULL, NULL)))
70
    if ((out_str = chardet_to_utf8(str, strlen(str), NULL, NULL, NULL)))
72
        return out_str;
71
        return out_str;
73
#  endif
74
#endif
72
#endif
75
73
76
    /* assume encoding associated with locale */
74
    /* assume encoding associated with locale */
Lines 98-106 Link Here
98
	bytes_read  = arg_bytes_read ? arg_bytes_read : &my_bytes_read;
96
	bytes_read  = arg_bytes_read ? arg_bytes_read : &my_bytes_read;
99
	bytes_write = arg_bytes_write ? arg_bytes_write : &my_bytes_write;
97
	bytes_write = arg_bytes_write ? arg_bytes_write : &my_bytes_write;
100
	error       = arg_error ? arg_error : NULL;
98
	error       = arg_error ? arg_error : NULL;
101
99
	
102
	g_return_val_if_fail(str != NULL, NULL);
100
	g_return_val_if_fail(str != NULL, NULL);
103
101
	
104
#ifdef USE_CHARDET
102
#ifdef USE_CHARDET
105
	if(cfg.chardet_detector)
103
	if(cfg.chardet_detector)
106
		det = cfg.chardet_detector;
104
		det = cfg.chardet_detector;

Return to bug 282637