Bug #253

Bad default character handling

Added by Raphaël Ouazana almost 2 years ago. Updated almost 2 years ago.

Status:Closed Start:06/07/2010
Priority:Normal Due date:
Assigned to:Jonathan Clarke % Done:

100%

Category:Packaging
Target version:1.2.1
Problem in version:

Description

Hi,

I use the cron job defined in LSC :

30 * * * * root [ -x #LSC_BIN ] && #LSC_BIN# -s all -c all > /dev/null 2>&1

While the command #LSC_BIN# -s all -c all works fine when I launch it in a terminal, it fails when launched by cron.

It was in fact a problem with the default terminal encoding. To make it work I had to add:

30 * * * * root [ -x #LSC_BIN ] && LANG=en_US.UTF-8 #LSC_BIN# -s all -c all > /dev/null 2>&1

But your meleage may vary, depending on your real configuration file encoding...

Regards,
Raphaël Ouazana.

Associated revisions

Revision 813
Added by Jonathan Clarke almost 2 years ago

Add default LANG environment variable to cron scripts. Fixes #253.

History

Updated by Jonathan Clarke almost 2 years ago

  • Category set to Packaging
  • Status changed from New to Closed
  • Assigned to set to Jonathan Clarke
  • Target version set to 1.2.1
  • % Done changed from 0 to 100

I have noticed similar problems before. I've commited your suggested fix to sample lsc.cron files.

I found that this can also be fixed by setting "en_US.UTF-8" in /etc/default/locale (on Debian-based systems, at least).

Updated by Raphaël Ouazana almost 2 years ago

Thank you. Just to note that my /etc/default/locale is already set to en_US.UTF-8. Maybe it is a shell problem (/bin/sh is called instead of /bin/bash...).

Also available in: Atom PDF