Other Ascii separators: FS, GS, RS, US

escape

Member

Reaction score: 5
Messages: 76

Does anyone remember what these characters were and where they were used?

What is the standard, and where can I get it? Are there any documents left in this standard form? How it works?

I'm trying to figure out how to output a CSV-file as a chart. Is the order like this from the bigger to smaller:

<file <group <record <unit> > > >

ie.

FS="\n"; GS=","; RECORD=12, 23, 34, 45\n 56, 67, 78, 89\n;

would print something like:


<TABLE>
<TR><TD>12</TD><TD>23</TD><TD>34</TD><TD>45</TD></TR>
<TR><TD>56</TD><TD>67</TD><TD>78</TD><TD>89</TD></TR>
</TABLE


What is the correct order?

escape
 
OP
E

escape

Member

Reaction score: 5
Messages: 76

Actually if RS is encountered, GS and US have to be closed and opened as well. If FS is found, all, GS, RS and UShave to be closed and so on. Something like:


<TABLE>
<TR><TD>first record<GROUP><US>1</US><US>2</US><US>3</US><US>4</US></GROUP><TD></TR>
<TABLE>


Every time FS was used and US was in output, the output would be

</US></GROUP></TD></TR><TR>

Awk has record and file separator strings. Maby it is compatible? Ascii has only charactrers.

A standard would help because the formatting can be done in different ways.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,908
Messages: 40,642

FS, RS, etc. are not characters (they're not like LF or CR for example, which are characters; Line-Feed, Carriage-Return resp.). They're variables that have a specific meaning in certain programming languages. How they're interpreted therefor depends on the language used.
 
OP
E

escape

Member

Reaction score: 5
Messages: 76

Really. I'm expecting this to be an old method to file records. Some government agencies must still have really old records. Knowing the format would help. I'm interested how they were used. This must have been when the terminal was used more than today and these characters had a special meaning in printing the file output.

Today we have HTML for example to print the output differently. Same form I suppose.

escape
 
OP
E

escape

Member

Reaction score: 5
Messages: 76

Good link. :rolleyes:

From there and Wikipedia: Download link of an ITU standard "International Reference Alphabet, IRA", 1992, URL: https://www.itu.int/rec/T-REC-T.50-199209-I/en

Wikipedia has the same, URL: https://en.wikipedia.org/wiki/C0_and_C1_control_codes#Field_separators
"Can be used as delimiters to mark fields of data structures. If used for hierarchical levels, US is the lowest level (dividing plain-text data items), while RS, GS, and FS are of increasing level to divide groups made up of items of the level beneath it."

FS should then change all of the separators if the application uses hierarchical levels? Change of FS changes GS, RS and US as well. This depends on the application, according to an outdated standard.

An older document would be nice to read to understand this properly.

escape :D
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,908
Messages: 40,642

FS should then change all of the separators if the application uses hierarchical levels? Change of FS changes GS, RS and US as well. This depends on the application, according to an outdated standard.

An older document would be nice to read to understand this properly.
They probably won't have that online, but you could always email them to ask for a copy from 1972. They may not have it any more though. Or maybe they'll happily snail mail you a dead tree copy ;)
 
OP
E

escape

Member

Reaction score: 5
Messages: 76

To add to the previous list. Printers (postscript and others) still have similar commands.

(And I mean by a "document" a document example where these characters are used.)
 
Top