Determine the locale encoding for Encode
