BUG: core: fix crash when unpickling data on Py3 under non-latin1 encoding
Merge pull request #4882 from pv/fix-unpickle-latin1-crash

BUG: core: fix crash when unpickling data on Py3 under non-latin1 encoding