Ios 月亮带口音的信息

Ios 月亮带口音的信息,ios,apple-push-notifications,moonapns,Ios,Apple Push Notifications,Moonapns,我使用以下代码向iPhone发送Apple推送通知: Public Function SendPush() As String Dim rt As String = "Sended!" Dim deviceToken As String = "my token" Dim message As String = "Parabéns é Campeão!" Try Dim payLoad As New NotificationPayload(devi

我使用以下代码向iPhone发送Apple推送通知:

Public Function SendPush() As String
    Dim rt As String = "Sended!"
    Dim deviceToken As String = "my token"
    Dim message As String = "Parabéns é Campeão!"
    Try

        Dim payLoad As New NotificationPayload(deviceToken, message, 1, "default")
        payLoad.AddCustom("RegionID", "IDQ10150")
        ' 51 is the badge no
        Dim notificationList = New List(Of NotificationPayload)() From { _
         payload _
        }

        Dim push = New PushNotification(True, "apn_developer_identity.p12", "password")
        Dim result = push.SendToApple(notificationList)
    Catch ex As Exception
        rt = "Error!"
    End Try

    Return rt

End Function
但在我的iPhone中,我的手机不接收口音。我收到这个:抛物线?坎普?奥

有人知道会发生什么吗

问候

解决了

我已更改为PushNotification.cs类中的library Moon APN:

// String length
byte[] apnMessageLength = BitConverter.GetBytes((Int16)Encoding.UTF8.GetBytes(apnMessage).Length);

// Write the message
memoryStream.Write(Encoding.UTF8.GetBytes(apnMessage), 0, Encoding.UTF8.GetBytes(apnMessage).Length);

重新编译并在项目中使用。现在接受拉丁字符。

您应该将负载编码为UTF-8。

如何?我下载了moon APN并在我的应用服务器中使用!我看不出这是哪里制造的!我不熟悉月球APN。我用Java编写了服务器端APNS代码,并将有效负载编码为UTF-8。您是否将有效负载作为字符串传递给moon apns库?是的,将有效负载作为字符串传递给moon apns库。我认为月球APN图书馆有它的决心,但不是。在您的服务器中,java是否接受拉丁字符?我使用UTF-8编码将字符串编码为字节,UTF-8编码可以对任何语言的字符进行编码。