diff --git a/docs/decisions.md b/docs/decisions.md index c48d82c..80c122f 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -434,11 +434,10 @@ rule and an index of the titles below. `writeParams()` ignores it, so an empty one, an absent one and one the wire cannot carry are the same input rather than three. A `data_coding` on a command that declares no such field is honoured the other way round, since it is `replace_sm`'s only way to name the alphabet its octets are in. - Rejected: refusing a string - `message_payload` outright and demanding - octets, which contradicts `short_message` on the same PDU. Rejected: guarding every string-valued - field against `data_coding`, which says nothing about them — a text field on the wire has an - alphabet of its own. + Rejected: refusing a string `message_payload` outright and demanding octets, which contradicts + `short_message` on the same PDU. Rejected: guarding every string-valued field against + `data_coding`, which says nothing about them — a text field on the wire has an alphabet of its + own. - **A GSM 03.38 message declares `data_coding` 0x00, and an inbound 0x01 is still read as GSM.** Maintainer's call, 2026-09-09: `dataCodingFor()` and `encodeBody()` both resolved an alphabet diff --git a/test/pdu.test.ts b/test/pdu.test.ts index 3fb637a..52d2723 100644 --- a/test/pdu.test.ts +++ b/test/pdu.test.ts @@ -554,7 +554,7 @@ describe('TLVs', () => { assert.deepEqual([id, state, unknown], ['0199d8a4-5e2c-7b3f-9a61-c4e07f2d8b15', 2, Buffer.from('01', 'hex')]); // @ts-expect-error an octet field takes no number, which would go out as its digits - assert.ok(objToPdu({ cmdName: 'deliver_sm', params: {}, tlvs: { network_error_code: { tagValue: 5 } } })); + objToPdu({ cmdName: 'deliver_sm', params: {}, tlvs: { network_error_code: { tagValue: 5 } } }); // @ts-expect-error message_state is an integer assert.ok(objToPdu({ cmdName: 'deliver_sm', params: {}, tlvs: { message_state: { tagValue: 'ENROUTE' } } }).err); });