Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

iOS DidReceiveRemoteNotification method NSDictionary Unicode Character Problem

rnuryrnury Member ✭✭

I am trying remote push notification with firebase cloud message. I compose the notification text which contains some Turkish characters (like ç, ş, ğ, ü).
While app is background, notification is displayed without a problem but while app is in foreground DidReceiveRemoteNotification method is triggered with NsDictionary userinfo parameter (contains the notification data). This userinfo parameter's Turkish characters are in unicode form.

i.e "\U0130leti\U015fim kaynakl\U0131" should be look like this: "İletişim kaynaklı"

What causes this situation? How can I fix this?


  • LandLuLandLu Member, Xamarin Team Xamurai

    Did you display them with labels?
    If you only print the parameter on the output window this could happen.
    I faced this before when using XCode to print some Chinese strings:
    But it shows correctly if I display them on the labels. You could have a try.

  • rnuryrnury Member ✭✭

    To warn the user with notification content while app in foreground, UIAlertView is used. It is also unicode in alert unfortunately. Can I somehow decode this?

  • LandLuLandLu Member, Xamarin Team Xamurai

    Could this string be displayed properly in your project?
    What's the charset of your string when you retrieve it from the notification?
    Try to use utf-8.

  • rnuryrnury Member ✭✭

    I enabled internationalization to mideast in iOS Build settings but I guess you didn't mean this. How can I set charset of string to utf-8?

  • LandLuLandLu Member, Xamarin Team Xamurai

    How did you send this notification?
    It seems the string has been encoded with a wrong charset so that it will be represented by Unicode.

Sign In or Register to comment.