Properly handle 1.8.x invalid utf