The CHN File Format

This page describes the format of CHN files that are used for transfer of TV Guide information within a text file. The CHN file contains a TV program schedule for one or more days. Every line of the file contains one show. Every line contains multiple columns where every column contains a field like channel name, start date, start time, title of the show etc.

CHN files can be loaded by FAB Network Controller to automatically create TV schedule pages. CHN files have to be copied to a folder on FAB Network Controller where they will be loaded automatically when TV Guide functionality is enabled and configured correctly.

Definitions

The CHN file format is simply a text file. Every text line contains information for one show of the TV schedule. Every CHN file can contain TV schedule for one day, one week or one month. It is recommended to store one week into each CHN file.

Every CHN file must have a filename with the extension .chn

The name of the CHN file can be anything. However it is recommended that the filename contains the channel name and the start date.

The CHN file should preferably be stored in Unicode UTF-16 or UTF-8 encoding with BOM (Byte Order Mark). If this is not possible then the encoding should the same one as used on the PC that will read CHN files, like ANSI 1252 or ANSI 1250.

Header

Every CHN file must contain a header which is the first line of the CHN file. Example of a header line: Channel;StartDate;StartTime;Title;ShortDesc

The header contains the names of the fields which are used in exactly the same order in all remaining lines of the CHN file. The names of the fields are separated by a semicolon character (ASCII 59).

In above example only the obligatory fields are shown. If more fields are used then the header must contain more fields.

Fields

Field name Description of the field
Channel Obligatory: Name of the channel: ZDF, ORF1, TVE1, …
StartDate Obligatory: Start date of the show in the format YYYY-MM-DD
StartTime Obligatory: Start time of the show in the format HH:MM or HH:MM:SS
Title Obligatory: Title of the show
ShortDesc Optional: Short description of the show. Maximum 2 lines or 70 characters
LongDesc Optional: Long description of the show. Normally contains 7 lines or approx. 245 characters
Category Optional: Name of the category of the show. 1-7 or any text
Flags Optional: Set of characters. S=Stereo, D=DS, B=Black and white, …
Vps Optional: VPS or PDC ID in the format MMDDHHMM or MMDDHHMMSSSSSPP
ID Optional: ID of the show
Invisible Optional: Contains Y if the time of the show should not be displayed on the TV schedule page
InvisibleEv Optional: Contains Y if this show should not be displayed
Duration Optional: The duration of the show in the format M or HH:MM or HH:MM:SS

Special Characters

Every text field that will be displayed on a teletext page may contain special characters which are described here.

The character ~ will not be displayed on automatically generated teletext pages. Instead a new line will be created on that position.

The following characters can be used to define teletext control characters like colours. These characters must be specified as words enclosed in special brackets {}. The following list shows the possible control characters.

Token Description
{Black} or {0} Text colour black
{Red} or {1} Text colour red
{Green} or {2} Text colour green
{Yellow} or {3} Text colour yellow
{Blue} or {4} Text colour blue
{Magenta} or {5} Text colour magenta
{Cyan} or {6} Text colour cyan
{White} or {7} Text colour white
{Flash} or {8} Flash on
{Steady} or {9} Flash off
{EB} or {10} End box
{SB} or {11} Start box
{NH} or {12} Normal height
{DH} or {13} Double height
{DW} or {14} Double width
{DS} or {15} Double size
{GBlack} or {16} Graphics colour black
{GRed} or {17} Graphics colour red
{GGreen} or {18} Graphics colour green
{GYellow} or {19} Graphics colour yellow
{GBlue} or {20} Graphics colour blue
{GMagenta} or {21} Graphics colour magenta
{GCyan} or {22} Graphics colour cyan
{GWhite} or {23} Graphics colour white
{Conceal} or {24} Conceal text
{CG} or {25} Contiguous graphics
{SG} or {26} Separated graphics
{ESC} or {27} Escape
{BB} or {28} Black Background
{NB} or {29} New background
{Hold} or {30} Hold graphics
{Release} or {31} Release graphics

Encoding of Reserved Characters

The characters ; and ″ are reserved. If these characters occur in the text then they have to be encoded specially. The character ; is used as a field separator. If this character occurs within a field then the complete field must be enclosed in ″″. Example: BR;2005-09-06;12:00; ″Title of the show; with semicolon″ If the character ″ occurs within a field then the complete field must be enclosed into ″″ and the character ″ must be doubled. Example: BR;2005-09-06;12:00; ″Title of the ″″show″″; with semicolon″

Example of a CHN File

The following shows an example of a CHN file. Filename: BR20050906.chn

Channel;StartDate;StartTime;Title;ShortDesc;Vps
BFS;2005-09-06;12:00;News at 12;News at noon;06091200
BFS;2005-09-06;12:15;Weather;;06091215
BFS;2005-09-06;12:22;The week in review;;06091220

This page was last updated on 2021-01-25