Avoiding charset corruption when sending patches