Fix a bug with non-ascii characters + use com.apple.afc if com.apple.afc2 is not present