Project

General

Profile

How to Decode USSD in unicode

Added by maxs almost 10 years ago

Hello, I use USSD command but it can 't decode in unicode
How to decode USSD in unicode.
Thank you.

ussd.JPG (44.2 KB) ussd.JPG

Replies (2)

RE: How to Decode USSD in unicode - Added by admin almost 10 years ago

Hi,

Please attach the log file here for us to check.

RE: How to Decode USSD in unicode - Added by goricap about 8 years ago

        public static String SendUssd(String __text)

        {
            UssdRequest ussdRequest = new UssdRequest(__text);

            ussdRequest.Dcs = UssdDcs.GetByNumeric(15);

            UssdResponse ussdResponse = mobileGateway.SendUssd(ussdRequest);

            String _response = ussdResponse.Content;

            Byte[] _bytes = new Byte[_response.Length / 2];

            for (int i = 0; i < _response.Length / 2; i++)
                _bytes[i] = Convert.ToByte(_response.Substring(i * 2, 2), 16);

            _response = Encoding.BigEndianUnicode.GetString(_bytes);

            return _response;
        }
    (1-2/2)