Hello there,
I have a python script that does something with the files. In user profile I've set locale to UTF-8, since some filenames/folders use special characters (other language than ENG). When I run script under the user profile, everything is working fine, but when I run it under the cronjob, the script fails with error "UnicodeEncodeError: 'utf-8' codec can't encode characters in position 37-38: surrogates not allowed".
So the question here is, is it possible to change locale for cronjob to UTF-8 for the duration when the script is running?
Locale settings for user:
LANG=sl_SI.UTF-8
LC_CTYPE="sl_SI.UTF-8"
LC_COLLATE=C
LC_TIME="sl_SI.UTF-8"
LC_NUMERIC="sl_SI.UTF-8"
LC_MONETARY="sl_SI.UTF-8"
LC_MESSAGES="sl_SI.UTF-8"
LC_ALL=
Thanks
I have a python script that does something with the files. In user profile I've set locale to UTF-8, since some filenames/folders use special characters (other language than ENG). When I run script under the user profile, everything is working fine, but when I run it under the cronjob, the script fails with error "UnicodeEncodeError: 'utf-8' codec can't encode characters in position 37-38: surrogates not allowed".
So the question here is, is it possible to change locale for cronjob to UTF-8 for the duration when the script is running?
Locale settings for user:
LANG=sl_SI.UTF-8
LC_CTYPE="sl_SI.UTF-8"
LC_COLLATE=C
LC_TIME="sl_SI.UTF-8"
LC_NUMERIC="sl_SI.UTF-8"
LC_MONETARY="sl_SI.UTF-8"
LC_MESSAGES="sl_SI.UTF-8"
LC_ALL=
Thanks