solved

Catch exception with unknown encoding, but took clean workaround from kreeger's solution.