Re: printout sending control codes to the console?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jerry Feldman wrote:
> On 02/24/2009 07:53 PM, Konstantin Svist wrote:
>> I have a script which prints out some data to the terminal, which I keep
>> in a screen session.
>> Often times I see indecipherable characters printed out and the output
>> freezes - I'm guessing some control code is being triggered from the
>> printout.
>> Is there a way to prevent this?
>>
>>
>>   
> ASCII contains a number of control codes. One of these is XOFF (stop
> output or control-S) and another is XON (resume output or control Q).
> Basically the C function isprint(3) tests if a character is printable
> (in C). I'm sure there are similar functions available to Perl and other
> scripting languages. Or you can simply test the value of a character. If
> it is < 0x20 it is a control character.
> 
You do not want to stop all control characters - you will need 0x0A
and 0x0D. You also need to watch out for are characters above 0x7F
as they will be special characters (font dependent).

Dependent on the terminal emulation, you may also have an alternate
font command. (0x0B?) This can produce interesting results.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux