From 45bffb53f9ce3ee7ba600a17486cf7e8d694faed Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 16 Dec 2025 02:15:22 +0100 Subject: [PATCH] pySim.ts_51_011.EF_SMSP: Also permit UCS2 for the alpha_id TS 51.011 Section 10.5.6 refers to clause 10.5.1 (EF.ADN), and the latter permits UCS2 in addition to 7-bit GSM alphabet. Change-Id: If10b3d6d8b34ece02dc0350ca9ea9c3f8fbf3c9e --- pySim/ts_51_011.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 92b44862..7532ba49 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -280,7 +280,7 @@ class EF_SMSP(LinFixedEF): def __init__(self, fid='6f42', sfid=None, name='EF.SMSP', desc='Short message service parameters', **kwargs): super().__init__(fid, sfid=sfid, name=name, desc=desc, rec_len=(28, None), **kwargs) ScAddr = Struct('length'/Int8ub, 'ton_npi'/TonNpi, 'call_number'/BcdAdapter(Rpad(Bytes(10)))) - self._construct = Struct('alpha_id'/COptional(GsmStringAdapter(Rpad(Bytes(this._.total_len-28)))), + self._construct = Struct('alpha_id'/COptional(GsmOrUcs2Adapter(Rpad(Bytes(this._.total_len-28)))), 'parameter_indicators'/InvertAdapter(FlagsEnum(Byte, tp_dest_addr=1, tp_sc_addr=2, tp_pid=3, tp_dcs=4, tp_vp=5)), 'tp_dest_addr'/ScAddr,