SourceAddress encoding issue

Post Reply
Misha3739
Posts: 2
Joined: Tue May 25, 2021 3:10 pm

SourceAddress encoding issue

Post by Misha3739 »

Unfortunately, when I use underscore in SourceAddress it is being passed as "\021" over network so the SourceAddress becomes invalid on server.
As example, ALROSA_MED changes to ALROSA\021MED while SMPP request preparing.
I have used WireShark to investigate the issue, the screenshot is attached.
Attachments
UnderscoreIssue.jpg
UnderscoreIssue.jpg (65.24 KiB) Viewed 135981 times
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: SourceAddress encoding issue

Post by alt »

Hello

you need to set correct encoding for the property _client.EncodingMapper.AddressEncoding
Misha3739
Posts: 2
Joined: Tue May 25, 2021 3:10 pm

Re: SourceAddress encoding issue

Post by Misha3739 »

Oh, that's working! Thank you!
Yechiel
Posts: 1
Joined: Wed Oct 19, 2022 1:09 pm

Re: SourceAddress encoding issue

Post by Yechiel »

Hi I ran into the same problem, how do I set the _client.EncodingMapper.AddressEncoding?
Thank you
alt
Site Admin
Posts: 992
Joined: Tue Apr 25, 2006 9:45 am

Re: SourceAddress encoding issue

Post by alt »

for example:

Code: Select all

_client.EncodingMapper.AddressEncoding = Encoding.ASCII;
Post Reply