GS (Group Separator) is ASCII code point 29 (0x1D), Unicode U+001D. It is a C0 control character that delimited groups of records within a file — the second-highest tier in ASCII's four-level separator hierarchy: US (0x1F), RS (0x1E), GS (0x1D), FS (0x1C). On early batch systems, 0x1D let a single file contain logically distinct record groups without requiring external structure. It persists in GS1 barcode standards, where the GS byte separates variable-length application identifier fields inside EAN-128 and DataMatrix symbologies. UTF-8 encodes it as the single byte 0x1D; Unicode classifies it as Cc (Control) with the alias GROUP SEPARATOR.
const char GS = 0x1D;char msg[] = "HDR\x1DGRP1\x1DGRP2"; // groups delimited by GSchar *g1 = strchr(msg, GS); // find first group boundarysize_t hdr_len = (size_t)(g1 - msg); // length before GS
GS (ASCII 29) separates groups of records within a data stream. In the ASCII separator hierarchy, it sits between File Separator (FS, the broadest) and Record Separator (RS, narrower). Think of it as separating chapters while RS separates paragraphs.
GS (specifically the FNC1/GS combination) is widely used in GS1 barcodes like GS1-128 and GS1 DataMatrix to separate variable-length data fields. If you scan barcodes in logistics or retail, GS is the hidden delimiter making sense of the data.
Yes, that's exactly where 'GS' in GS1 comes from conceptually. In practice, GS1 barcodes use ASCII 29 (GS) as the function code separator between Application Identifiers, making it one of the few ASCII control characters still in active industrial use.
If you're parsing barcode data, treat GS as a meaningful delimiter — splitting on it gives you separate data fields. For general text processing, strip it as a non-printable control character since it has no visible representation.