cron job and extended ascii files

cron job and extended ascii files

Post by Sagar A. Tamha » Sat, 21 Jun 2003 20:49:43



Hello,

I have a text file on the disk. The contents of the file are all
characters from ascii value 33 to 250 (except the numbers 0..9). I
have a Java program which reads this file and displays the contents.

When the prog. is run at command prompt, everything is fine. When the
program is run through cron, the result shows only characters which
are below ascii value 128. The characters above 128 are seen as a '?'
(question mark).

I have set the TERM="xterm", since thats what echo $TERM says on a
command prompt.

Can anyone please help me to display the characters above 128.

regards,
 -sagarr

 
 
 

cron job and extended ascii files

Post by Lew Pitche » Sat, 21 Jun 2003 21:48:52



> Hello,

> I have a text file on the disk. The contents of the file are all
> characters from ascii value 33 to 250 (except the numbers 0..9).

Sorry, but you /don't/ have an ASCII file, then. ASCII is a 7bit coded
characterset, and only expresses codepoints between 0x00 (0) and 0x7f (127)
inclusive. There are /no/ ASCII characters above codepoint 127.

Quote:> I
> have a Java program which reads this file and displays the contents.

> When the prog. is run at command prompt, everything is fine. When the
> program is run through cron, the result shows only characters which
> are below ascii value 128.

See above: ASCII does not have any characters above codepoint 127. If you
try to display such codepoints /as ASCII/, the display process cannot handle
them, and will substitute a generic glyph for any of those characters.

Quote:> The characters above 128 are seen as a '?'

See! Codepoints above 127 are not ASCII, and the display process substitutes
the '?' glyph for them.

Quote:

> I have set the TERM="xterm", since thats what echo $TERM says on a
> command prompt.

> Can anyone please help me to display the characters above 128.

Change your characterset to something other than ASCII.

Beware, the glyphs for any codepoint vary depending on the characterset you
select. Select the /correct/ characterset for your data or you won't be able
to see your data correctly.

--

Lew Pitcher, IT Consultant, Application Architecture
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)

 
 
 

cron job and extended ascii files

Post by Sagar A. Tamha » Wed, 25 Jun 2003 20:21:16




> > Hello,

> > I have a text file on the disk. The contents of the file are all
> > characters from ascii value 33 to 250 (except the numbers 0..9).

> Sorry, but you /don't/ have an ASCII file, then. ASCII is a 7bit coded
> characterset, and only expresses codepoints between 0x00 (0) and 0x7f (127)
> inclusive. There are /no/ ASCII characters above codepoint 127.

> > I
> > have a Java program which reads this file and displays the contents.

> > When the prog. is run at command prompt, everything is fine. When the
> > program is run through cron, the result shows only characters which
> > are below ascii value 128.

> See above: ASCII does not have any characters above codepoint 127. If you
> try to display such codepoints /as ASCII/, the display process cannot handle
> them, and will substitute a generic glyph for any of those characters.

> > The characters above 128 are seen as a '?'

> See! Codepoints above 127 are not ASCII, and the display process substitutes
> the '?' glyph for them.

> > I have set the TERM="xterm", since thats what echo $TERM says on a
> > command prompt.

> > Can anyone please help me to display the characters above 128.

> Change your characterset to something other than ASCII.

> Beware, the glyphs for any codepoint vary depending on the characterset you
> select. Select the /correct/ characterset for your data or you won't be able
> to see your data correctly.

Hello,
I was setting the variables like LANG in the .sh script which is
called by cron. It was not working. Now i am setting the variables in
the crontab and everything is working great. I can see the characters
above 127.

thanks,
-sagar

 
 
 

1. cron job and extended ascii files

Hello,

I have a text file on the disk. The contents of the file are all
characters from ascii value 33 to 250 (except the numbers 0..9). I
have a Java program which reads this file and displays the contents.

When the prog. is run at command prompt, everything is fine. When the
program is run through cron, the result shows only characters which
are below ascii value 128. The characters above 128 are seen as a '?'
(question mark).

I have set TERM=xterm in the .sh file which calls the java prog, but
it makes no difference.

Can anyone please help me to display the characters above 128.

regards,
-sagar

2. detecting EOT

3. MacBSD problems on LC520

4. extended ASCII for ascii to ebcidc conversion

5. How can I get supplementary groups

6. cron.deny and cron.allow files for CRON management

7. g++ problem

8. Difference between cron job and real time job

9. datestamped file from cron job output

10. Mail a file from a cron job

11. cron jobs and file locking

12. etrieve a text file via HTTP in a cron job