XS.xs
static SV* _encoding_fix_latin_xs(SV* source) { SV* out = NULL; // Defer initialisation U8 *ph, *pt; UV i, bytes; STRLEN l; ph = pt = SvPV(source, l); bytes = SvCUR(source); for(i = 0; i < bytes; i++, ph++) { if((*ph & 0x80) == 0) continue; // ... } if(out == NULL) return(source);