replace CFStringGetSystemEncoding with CFStringGetFastestEncoding for safe encoding selection of a system