Correctly manage maximum lengths of certain HMT fields #30

Merged
af123 merged 4 commits from df/webif:df-hmtfieldlength-patch into master 2021-02-24 13:04:16 +00:00
Owner

The title and synopsis fields have a maximum length. The maximum is enforced in the UI by the maxlength attribute of the <input> elements. It's also supposed to be enforced in the ts settitle and ts setsynopsis methods, but there are missing $s that break that. As a '\025' is now prefixed to the user's input, the maximum needs to be reduced.

Does "guidance" need the same treatment?

The title and synopsis fields have a maximum length. The maximum is enforced in the UI by the `maxlength` attribute of the `<input>` elements. It's also supposed to be enforced in the `ts settitle` and `ts setsynopsis` methods, but there are missing $s that break that. As a '\025' is now prefixed to the user's input, the maximum needs to be reduced. Does "guidance" need the same treatment?
df added 2 commits 2020-12-31 15:27:38 +00:00
df added 1 commit 2021-02-22 16:35:56 +00:00
df added 1 commit 2021-02-22 19:31:25 +00:00
df changed title from WIP: correctly manage maximum lengths of certain HMT fields to Correctly manage maximum lengths of certain HMT fields 2021-02-22 20:11:01 +00:00
Author
Owner

I'm not sure about the Guidance field.

The Title and Synopsis (synposis in the Wiki) are said to have 3 byte headers followed by the text, but, as I understand, are actually text header+field things that work like this (based on ETSI EN 300 468 V1.11.1 (2010-04) stashed in the Wiki):

If the first byte is 1..7 or 9..11, the text is ISO 8859-x in bytes 2..end.

If the first byte is 0x10, then if the second is 0 and the third is 0..15, the text is ISO 8859-x in bytes 4..end; or, if the second and third bytes are 0x69, 0x37 (a fake code), the text is ISO 6937 in bytes 4..end.

If the first byte is 0x15, the text is UTF-8 in bytes 2..end.

If the first byte is 0x1f, the text is ETSI 101162 Encoding_Type_ID, with an encoding defined by byte 2 (eg, as used in HD EPG), in bytes 3.. end.

Other first byte codes: #0x11 Unicode BMP, #0x12 KSX1001-2004, #0x13 GB-2312-1980, #0x14 Unicode Big5.

But the Guidance field has only a single header byte.

Have the first two bytes been overloaded to hold the guidance mode and type, or is the 1+74 field actually 3+72, where the default encoding is UTF-8 and so appears as 1+74?

I'm not sure about the Guidance field. The Title and Synopsis (*synposis* in the Wiki) are said to have 3 byte headers followed by the text, but, as I understand, are actually text header+field things that work like this (based on ETSI EN 300 468 V1.11.1 (2010-04) stashed in the Wiki): > If the first byte is 1..7 or 9..11, the text is ISO 8859-x in bytes 2..end. > > If the first byte is 0x10, then if the second is 0 and the third is 0..15, the text is ISO 8859-x in bytes 4..end; or, if the second and third bytes are 0x69, 0x37 (a fake code), the text is ISO 6937 in bytes 4..end. > > If the first byte is 0x15, the text is UTF-8 in bytes 2..end. > > If the first byte is 0x1f, the text is ETSI 101162 Encoding_Type_ID, with an encoding defined by byte 2 (eg, as used in HD EPG), in bytes 3.. end. > > Other first byte codes: #0x11 Unicode BMP, #0x12 KSX1001-2004, #0x13 GB-2312-1980, #0x14 Unicode Big5. > But the Guidance field has only a single header byte. Have the first two bytes been overloaded to hold the guidance mode and type, or is the 1+74 field actually 3+72, where the default encoding is UTF-8 and so appears as 1+74?
af123 merged commit a1cf871a84 into master 2021-02-24 13:04:16 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hummypkg/webif#30
No description provided.