Page 1 of 1

National character set problem with cron

PostPosted: Mar 2nd, '14, 23:42
by mackowiakp
I have server working as standalone, without any user logged in during normal operation. It has several application installed, running from cron and result of execution of such application is mailed to my particular account using MAILTO statement in cron configuration of root and other user.
After upgrade M3->M4, all mailed information, comes with strange characters in place of national characters of my language.
Any advice. What is not configured properly or should be changed for proper displaying of my national characters?

Re: National character set problem with cron

PostPosted: Mar 3rd, '14, 00:07
by doktor5000
Please show the output of
Code: Select all
localectl status
locale
rpm -qa | grep locale

Re: National character set problem with cron

PostPosted: Mar 3rd, '14, 08:46
by mackowiakp
So You have. The server has no X running, but when I run X manually, all X interface elements are display properly in my language, including national characters.

Code: Select all
[root@media ~]# localectl status
   System Locale: n/a

       VC Keymap: n/a
      X11 Layout: n/a
[root@media ~]# locale
LANG=pl_PL.UTF-8
LC_CTYPE=pl_PL.UTF-8
LC_NUMERIC=pl_PL.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE=pl_PL.UTF-8
LC_MONETARY=pl_PL.UTF-8
LC_MESSAGES=pl_PL.UTF-8
LC_PAPER=pl_PL.UTF-8
LC_NAME=pl_PL.UTF-8
LC_ADDRESS=pl_PL.UTF-8
LC_TELEPHONE=pl_PL.UTF-8
LC_MEASUREMENT=pl_PL.UTF-8
LC_IDENTIFICATION=pl_PL.UTF-8
LC_ALL=
[root@media ~]# rpm -qa | grep locale
locales-pl-2.18-2.mga4
locales-2.18-2.mga4
locales-en-2.18-2.mga4

Re: National character set problem with cron

PostPosted: Apr 3rd, '14, 13:55
by mackowiakp
Still no have solution for crontab stared apps and national character set.

I try to place "locale" command as cron task. So the output was:

Code: Select all
LANG=pl_PL.UTF-8
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=


I try to place all above to /etc/enviroment file, i try to place LANG=pl_PL.UTF-8 before particular command started from cron etc, tec.
Still no success. I get strange symbols in place of Polish letters. I try a lot of potential solution taken from Google search. No way.
Even default (installed by system) cron actions (daily, weekly, monthly etc) mailed as result of execution, info without Polish letters.
What can I do? There was not such problem in M3.