Unprintable unicode error reporting

Also fixed a test for resourcetypes