473,395 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Re: NUL to terminate strings; was reinventing ASCII?

On Mar 11, 8:04 am, billg...@cs.uofs.edu (Bill Gunshannon) wrote:
Actually, EOT = end of transmission
ETX = end of text
But the problem with this approach is it misses the point of ASCII.
American Standard Code for Information Interchange
While ASCII has been used for local storage of characters I believe its
intended purpose was for moving them between locations over what were the
common transmission methods of its day. Thus I think while there is an
ETX it would be meaningless without a preceding STX somewhere in the string.
Precisely. What makes ASCII NUL an appropriate terminator for
terminated strings is that fact that it is defined *in* ASCII as a ...
uh ... NUL character ... a character that the transmitter is free to
add as much as it wishes, say to keep a connection alive or to provide
a timing delay ... and which the receiver is free to discard on
receipt. A no-op.

It is, therefore, one character in ASCII that is not meaningful as a
character.

Now, we very rarely do text fascimile transmission anymore (!), but
there are lots of analogues that could be found.

For text in storage rather than text in flight, the main useful ones
are FS GS RS and US, though if the resources are not available to
support UTF-8, and Latin-1 is not appropriate, SI and SO are also
useful.

If the process of a fascimile sender and fascimile receiver is mapped
as an analogy to the process of a selected SPI device or the
microcontroller acting as bus master talking to the other as sender
and receiver, many of the others can be found a reasonable use. And in
that context, the last thing you'd want would be to have them as
printable characters, or in use as part of the massages being passed
back and forth, since the whole point is that if the character AND $E0
is 0, its an ASCII7 control, and then you can do an indexed jump to
act on it, while it its not, you repeat the loop that you are in.
Jun 27 '08 #1
0 1064

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Laurent Therond | last post by:
Maybe you have a minute to clarify the following matter... Consider: --- from cStringIO import StringIO def bencode_rec(x, b): t = type(x)
2
by: Bill Janssen | last post by:
I've encountered an issue dealing with strings read from files. I read a line from a file, then try to print it out as an ASCII string: line = fp.readline() print line.encode('US-ASCII',...
16
by: Paul Prescod | last post by:
I skimmed the tutorial and something alarmed me. "Strings are a powerful data type in Prothon. Unlike many languages, they can be of unlimited size (constrained only by memory size) and can hold...
6
by: Dmitri | last post by:
Hi there, Does anybody know what is DB2 UDB admin API equivalent to "db2 terminate" command? Some background: I'm developing monitoring application(http://chuzhoi_files.tripod.com). I want...
4
by: Martin Fletcher | last post by:
when I execute dim strTEMP_DATA as string strTEMP_DATA = Encoding.ASCII.GetString(rBuffer).ToString I alway get a string without the closing quote. I see this in the 'Autos' window, I also...
2
by: Fuzzyman | last post by:
Hello all, Can someone confirm that compiled regular expressions from ascii strings will always (and safely) yield unicode values when matched against unicode strings ? I've tested it and it...
3
by: Sandra-24 | last post by:
I'd love to know why calling ''.join() on a list of encoded strings automatically results in converting to the default encoding. First of all, it's undocumented, so If I didn't have non-ascii...
14
by: Dennis Benzinger | last post by:
Hi! The following program in an UTF-8 encoded file: # -*- coding: UTF-8 -*- FIELDS = ("Fächer", ) FROZEN_FIELDS = frozenset(FIELDS) FIELDS_SET = set(FIELDS)
16
by: Sébastien Boisgérault | last post by:
Hi, Could anyone explain me how the python string "é" is mapped to the binary code "\xe9" in my python interpreter ? "é" is not present in the 7-bit ASCII table that is the default encoding,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.