corrected modgen
if environment variable LANG it not set, refer to __CF_USER_TEXT_ENCODING