I have tried the cronie solutions, (with LC_ALL=fr_FR.UTF-8 on cronie) but there is a message when saving : 

couldn't set locale correctly
couldn't set locale correctly
cronie: installing new crontab

For the export in the script, it fail with message 

/home/hercule/batch/LienHu.sh: LANG=fr_FR.utf8: n'est pas un identificateur

or

/home/hercule/batch/LienHu.sh: LANG=hu_HU.UTF-8: is not an identifier

I have also tried the command line

export LANG=fr_FR.utf8
in the terminal but it doesn't change anything.

I don't understand where the problem comes from.

Hercule

2012/9/24 Danny B. <Wikipedia.Danny.B@email.cz>
> ------------ Původní zpráva ------------
> Od: Hercule Hercule <hercule.wikipedia@gmail.com>
> Předmět: [Toolserver-l] Trouble with shell file encoding
> Datum: 24.9.2012 10:20:55
> ----------------------------------------
> Hello,
>
> I have some troubles with a script I run on hu.wikipedia.
>
> I have created a script, which name is LienHu.sh and content is
>
> #-*- coding: utf-8 -*-
> #!/usr/bin/python
> python /home/hercule/template.py "Ideig" "Ideig/Automatikus törlés"
> -cat:"Lapok láthatatlanná vált ideig sablonnal" -summary:"Bot: {{Ideig}}
> sablonhívás törlése a cikk létrehozása következtében" -assubst -pt:0
> -lang:hu -always
> python /home/hercule/template.py "Linkiw" "Linkiw/Automatikus törlés"
> -cat:"Lapok láthatatlanná vált linkiw sablonnal" -summary:"Bot: {{Linkiw}}
> sablonhívás törlése a cikk létrehozása következtében" -assubst -pt:0
> -lang:hu -always
> python /home/hercule/template.py "Piroslink" "Piroslink/Automatikus
> lecserélés" -cat:"Lapok felesleges piroslink sablonnal" -summary:"Bot:
> {{Piroslink}} sablonhívás lecserélése a cikk létrehozása következtében"
> -assubst -lang:hu -always
> python /home/hercule/template.py "Piroslink*" "Piroslink*/Automatikus
> lecserélés" -cat:"Lapok felesleges piroslink sablonnal" -summary:"Bot:
> {{Piroslink*}} sablonhívás lecserélése a cikk létrehozása következtében"
> -assubst -lang:hu -always
>
> This file is encoded in UTF-8
>
> When I run the command line
>
> ./LienHu.sh in my folder I have a correct execution (see
> http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:Oliv0&diff=12370416&oldid=12370415
>  )
>
> But when I run it with cronie :
>
> 9 8 * * * newtask -p batch /home/hercule/batch/LienHu.sh
>
> There are problems with text encoding (see
> http://hu.wikipedia.org/w/index.php?title=Szerkeszt%C5%91:Oliv0&diff=12370388&oldid=12370384
>  )
>
> I need help to solve this file encoding problem.
>
> Regards
>
> Antoine alias Hercule

Somebody suggested me in past to put

LC_ALL=en_US.UTF-8

as the very first line in crontab. So I did and no longer have issues.


Kind regards


Danny B.

_______________________________________________
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette