Null Control characters on Tru64 Unix

Jeff Hoffman wonicon at optusnet.com.au
Sun Oct 16 08:53:50 CDT 2005


Glenn

Not sure if this is what you want but certain Unix commands strip out null 
characters (or treat them as end of record characters) I am sure quiz will 
put out nulls as the other guys suggest but if you use certain unix 
commands such as vi then the nulls will be stripped when you do a write. 
Not quite sure but 'C' programs use a null to terminate a string so if a 
'C' program is used to pass the data then I think it will interpret a null 
as an end of string indicator not as a piece of the data.

One way around it would be to use quiz to put out a special character that 
is not used in you data (possibly ~) then use the 'tr' command to translate 
the character to null, prior to printing

eg
quiz ......
unix commands ....
cat file | tr "~" "\000" | lp

If quiz is already putting out a null then use 'tr' to convert null to a 
special character, to protect the string when being used by other commands, 
then 'tr' them back before printing.

eg
quiz ......
cat file | tr "\000" "~" > file2
unix commands ....
cat file2 | tr "~" "\000" | lp

The main problem is with null buts also other unix command utilize other 
binary characters as control characters, so you have to keep reading the 
'flaming' man(uals).

Jeff


At 02:08 AM 15/10/2005, you wrote:

>Hi
>
>I am attempting writing a barcode string to a printer through quiz on a 
>tru64 unix box , the required string contacts a null control charater 
>which the tru64 box is stripping out.
>
>The question is does anybody know how to enter a control null character on 
>tru64 , im using vi and doing ^v to enter the control charater mode then
>^@ for the null charater
>
>
>Thanks
>Glenn
>--
>= = = = = = = = = = = = = = = = = = = = = = = = = = = =
>Mailing list: powerh-l at lists.sowder.com
>Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
>Unsubscribe: "unsubscribe <password>" in message body to 
>powerh-l-request at lists.sowder.com
>http://lists.sowder.com/mailman/listinfo/powerh-l
>This list is closed, thus to post to the list you must be a subscriber.



More information about the powerh-l mailing list