Apply the target encoding when loading test reference files.