mangle possibly binary data