KDE PIM/KItinerary/ZSSK Barcode: Difference between revisions

From KDE Community Wiki
Line 34: Line 34:
| 7 || string || arrival station name ||  
| 7 || string || arrival station name ||  
|-
|-
| 8 || <number>[<digit>.tr.] || train number and class ||  
| 8 || <number>[<digit>.tr.] || train number and class || ("trieda" is class)
|-
|-
| 9 || date/time || departure time ||
| 9 || date/time || departure time ||
Line 58: Line 58:
| 19 || date/time || ? || ?
| 19 || date/time || ? || ?
|-
|-
| 20 || 7 digit number || ? || can be empty, possibly related to a discount program?
| 20 || 7 digit number || discount program membership number ||  
|-
|-
| 21 || 7 digit number || ? || can be empty, possibly related to a discount program?
| 21 || 7 digit number || ? || can be empty, possibly related to the discount program?
|-
|-
| 22 || "N" ||  || fixed value
| 22 || "N" ||  || fixed value
Line 68: Line 68:
| 24 || string || ticket name/title || e.g. "CESTOVNÝ LÍSTOK"
| 24 || string || ticket name/title || e.g. "CESTOVNÝ LÍSTOK"
|-
|-
| 25 || string || tariff name? ||
| 25 || <string>": "<digit> || tariff name? || e.g. "OBYČAJNÝ" (ordinary) or "KLASIK RP" (discount program), digit is 1 in all samples
|-
|-
| 26 || string || ticket type? || e.g. "JEDNOSMERNÁ CESTA" (one way)
| 26 || string || ticket type? || e.g. "JEDNOSMERNÁ CESTA" (one way)

Revision as of 18:02, 17 June 2022

Domestic Ticket

General Observation

  • Aztec barcode, in PDF or image
  • Variable length
  • For domestic tickets only, international ones use RCT2 in UIC 918.3 container
  • zlib compressed textual payload starting at offset 3.
  • zlib decompressed content is plain text and hardly larger than the full compressed data, which suggests the compressed data doesn't span the full length of the barcode (signature?).

Textual Payload Structure

  • 34 lines, delimited by 0x0A
  • UTF-8 encoded
  • date/time format: 8 digits, the first 4 seems to correspond to the day?, the last four are the time in hhmm format.
Index Format Meaning Notes
0 "P" fixed value
1 16 digit number ticket number
2 6-8 digit number ?
3 N.NN ticket price in EUR
4 N.NN price? 0.00 in all samples
5 N.NN price? 0.00 in all samples
6 string departure station name
7 string arrival station name
8 <number>[<digit>.tr.] train number and class ("trieda" is class)
9 date/time departure time
10 date/time arrival time
11 string passenger name
12 ? ? 0 in all samples
13 ? ? empty in all samples
14 ? ? empty in all samples
15 ? ? empty in all samples
16 ? ? empty in all samples
17 1-3 digit number ?
18 ? ? 0 in all samples
19 date/time ? ?
20 7 digit number discount program membership number
21 7 digit number ? can be empty, possibly related to the discount program?
22 "N" fixed value
23 "text" fixed value
24 string ticket name/title e.g. "CESTOVNÝ LÍSTOK"
25 <string>": "<digit> tariff name? e.g. "OBYČAJNÝ" (ordinary) or "KLASIK RP" (discount program), digit is 1 in all samples
26 string ticket type? e.g. "JEDNOSMERNÁ CESTA" (one way)
27 ? ? empty in all samples
28 "Z: "<string> departure station name
29 "Do: "<string> arrival station name
30 "Km: "<string> ? distance? seems to contain class?
31 "Vlak: "<number> train number
32 ? ? empty in all samples
33 ? ? empty in all samples