Re: can't get correct chinese character through crontab execute, but wroks fine by manual
From: Rich Gibbs (rgibbs_at_REMOVEalumni.CAPSprinceton.edu)
Date: 01/17/05
- Next message: Rishi: "Linux vs FreeBSD"
- Previous message: Heiner Steven: "Top 10 subjects comp.unix.questions"
- Next in thread: cbac: "Re: can't get correct chinese character through crontab execute, but wroks fine by manual"
- Reply: cbac: "Re: can't get correct chinese character through crontab execute, but wroks fine by manual"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 16 Jan 2005 23:42:54 -0500
cbac said the following, on 01/16/05 21:53:
> Hi All!
>
> I have a java class which will check the abnormal appliaction cases
> in my oracle database and then send email to notice the people in
> charged. I scheduled it in the crontab of the application server
> (Solaris 8 on SunFire 280).
>
> The email content should be in Traditional Chinese (for our local
> outlet manager). Basicly, whole system works fine if I manually execute
> the java class throught a xxx.sh script, but all of the chinese
> characters become "??" if the the xxx.sh was executed through crontab.
>
> If I can't find the answer, I will use TimerTask to implement
> another class to do the schedule things. Any other suggest?
> Thanks in advance!
>
I don't have any specific knowledge about the use of Chinese characters
in Java, but this sounds like a case of a fairly common, more general
problem.
The initial conditions under which a 'cron' job is executed are
typically _not_ the same as those initially set up for an interactive
shell. In particular, start-up scripts may not be executed, and
environment variables may not be set, or set differently (especially
PATH).
Perhaps running through crontab is not giving you a setting that is
needed to map the Chinese characters correctly.
-- Rich Gibbs rgibbs@alumni.princeton.edu
- Next message: Rishi: "Linux vs FreeBSD"
- Previous message: Heiner Steven: "Top 10 subjects comp.unix.questions"
- Next in thread: cbac: "Re: can't get correct chinese character through crontab execute, but wroks fine by manual"
- Reply: cbac: "Re: can't get correct chinese character through crontab execute, but wroks fine by manual"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|