codec¶
- 
class 
naz.codec.GSM7BitCodec[source]¶ Bases:
codecs.CodecSMPP uses a 7-bit GSM character set. This class implements that encoding/decoding scheme. Users should never have to use this directly, instead; use naz.protocol.SubmitSM(encoding=”gsm0338”)
Example Usage:
import naz codec = naz.codec.GSM7BitCodec() codec.encode("foo €")
- 
class 
naz.codec.UCS2Codec[source]¶ Bases:
codecs.CodecThis class implements the UCS2 encoding/decoding scheme. Users should never have to use this directly, instead; use naz.protocol.SubmitSM(encoding=”ucs2”)
UCS2 is for all intents & purposes assumed to be the same as big endian UTF16.
- 
naz.codec.register_codecs(custom_codecs=None)[source]¶ Register codecs, both custom and naz inbuilt ones. Custom codecs that have same encoding as inbuilt ones will take precedence. Users should never have to use this directly, instead; use naz.Client(custom_codecs={“my_encoding”: codecs.CodecInfo(name=”my_encoding”, encode=…, decode=…)})
- Parameters
 custom_codecs (
Union[None,Dict[str,CodecInfo]]) – a list of custom codecs to register.