Try deactivating the fastcook setting on the affected port(s):
# ditty printer -fastcook /dev/ttyx##
Then see if this resolves the random characters with the application. If so, you will want to add this ditty command to a start up script to make it permanent after rebooting. The /etc/rc.d/8/userdef file will work just fine.