Apple Push Notification Service - use of £ and € characters in message text - ios

I'm building a service to push out notifications to iOS devices over APNS. Everything is working great, except for the fact that if the message text includes the £ (British Pound) or € (Euro) characters then the notification is not sent by APNS. I don't think this is a JSON issue as they don't normally need escaping (I've tried escaping them anyway to no avail). Is there something I need to do in order to support the whole character set?

Have you tried the JSON ASCII escape for Unicode? Send \u00A3 for £ and \u20AC for €.
JSON character encoding - is UTF-8 well-supported by browsers or should I use numeric escape sequences?

Related

Does AWS Lex support emoji conversations & intent ?

I've tried building an intent that targets :thumbsup: and also the unicode representation U+1F44D
how can I build an intent around emojis ?
Unfortunately :thumbsup: and U+1F44D will be invalid.
An utterance can consist only of Unicode characters, spaces, and valid
punctuation marks. Valid punctuation marks are: periods for
abbreviations, underscores, apostrophes, and hyphens.
You have to handle emoji before sending it to Lex. Like if you get :thumbsup: value then send thumbsup to Lex and it will handle that intent.

How to parse Byte Order Mark UTF-8 text file in objective C ios

I have sent a text file as an attachment from from whatsapp and then when opened the sent file in iPhone app I am seeing =EF=BB=BF in start which means it is BOM utf-8 file. My question is why '=' character is coming after every code instead of 0x?
Also all emoji are coming in this style =F0=9F=98=9D, how can I convert this into simple text in objective C? Any help is much appreciated.
Thanks
What you're seeing is quoted-printable encoding. This encoding scheme escapes non-printable ASCII or 8-bit characters as =xx where xx is the hex value of the byte. Quoted-printable is mainly used in email transmission. See the question Objective-C decode quoted printable text for tips on decoding.

Special characters conversion from service in iOS

I am getting some data from response which includes some special characters. The text is in Chinese format. Here I have shown the special characters.
Please have a look and advise me how to convert this to Chinese format. It is possible in android using this method
String s = "hhh";
s.getBytes("Windows-1252");
Special Characters string is
"P.R. China 100020 中国北京市æœé˜³åŒºæœå¤–大街22å·æ³›åˆ©å
¤§åŽ¦408室"

Characters allowed in course name while passing it through the webserive in Desire2Learn

While creating a course I send the character to course name which when I looked up in Desire2Learn got transferred to a "?". The character send was dash (not the one that you can directly entered from keyboard (-) but little bit longer (like in "Course – name") - I got that from while copying the name from word). However this leads to the question which character are supported in D2L course name so that we can send the simmilar character set. Also what will happen if the character is for a chinese or polish course name?
[updated - 15/12] - When I am sending Japanese character in place of username - it is also showing them as a series of "?"
thanks
Resolved - actually I was using Ascii encoding to convert the data into bytes before submitting to POST. Change to UTF8 encoding now resolved the issue.

IOS Localizing Push Notifications

When I was prototyping for push notifications I had a php script with a non localized string pushed to the iphone, here I could also include emoji symbols.
I have now made a webservice using asp.net and I localize the push notifications on the IOS side.
But I cant seem to get emoji symbols to work now, Ive tried every combination og unicode escape
sequences in the localized string, and also tried sending the emoji as an argument in the push notification and having it included in the localized string "%#" and "%C" but to no luck.
Im stuck atm, so any tip to put me back on track is very much appriciated
Stefan
According to the JSON RFC, characters that are not part of the "Basic Multilingual Plane" can be escaped using a UTF-16 surrogate pair.
For example the emoji symbol "THUMBS UP SIGN" is Unicode codepoint U+1F44D, and the UTF-16 surrogate pair for this is
0xD83D, 0xDC4D
The JSON Unicode escape sequence would be
\ud83d\udc4d
If you include this in the alert part of the push notification payload, the symbol will be correctly displayed (I have tested it).
But you can also use UTF-8, for the "THUMBS UP SIGN" this would be the bytes
0xF0, 0x9F, 0x91, 0x8D

Resources