2017-12-04 7 views
0

JamaaTech SMPP 라이브러리를 사용하여 SMSC 제공 업체의 SMS를 모바일로 보내고 있습니다. 아랍 문자 메시지를 보내고 싶지만 휴대 전화에 한자를 받는다. 아래는 제 코드입니다.Jamaa SMPP가 아랍어 텍스트를 보낼 수 없습니다.

 SmppClient client = new SmppClient(); 
     SmppConnectionProperties properties = client.Properties; 

     properties.SystemID = "XXX"; 
     properties.Password = "XXX"; 
     properties.Port = XXXX; 
     properties.Host = "XXX.XXX.XXX.XXX"; 
     properties.SourceAddress = "XXXXXXXXXX"; 
     properties.DefaultEncoding = DataCoding.UCS2; 

     //Resume a lost connection after 30 seconds 
     client.AutoReconnectDelay = 3000; 

     //Send Enquire Link PDU every 15 seconds 
     client.KeepAliveInterval = 15000; 

     //Start smpp client 
     client.Start(); 

     while (client.ConnectionState != SmppConnectionState.Connected) 
      Thread.Sleep(100); 

     var msg = new TextMessage(); 

     msg.DestinationAddress = "XXXXXXXXXXX"; 
     msg.SourceAddress = "XXXXXXXXXX"; 
     msg.Text = "س"; 
     msg.RegisterDeliveryNotification = true; 

     client.SendMessage(msg); 

나는 다른 솔루션을 시도하고 google에서 검색하는 것에 지쳤습니다. 누군가가 이걸 도와 줄 수 있다면 정말 고마워.

답변

0

중국 메시지는 유니 코드로 인코딩되어야합니다.

+0

그것은 중국어 글자가 아니었고, 아랍어 문자 메시지는 내가 원하지 않는 중국어 문자로 변환되었습니다. 어쨌든, 나는 그 문제를 해결했다. –