add warning when attempting to fix invalid encoding