bpoweski/apnserver — Issue #7: UTF8 encoding issues
Author: slemiere
Created: 2011-10-21 15:36:04+00:00
State: open

Hello,

I have run into issues when trying to send push notifications with utf8 character in it on ruby 1.9. With 2 changes on my fork I was able to send push with utf8 content:

1. Use the JSON generate/parse methods instead of activesupport's as activesupport would encode the utf8 char as something like \ue002e and apple doesn't support that.
2. Use bytesize instead of size when adding the length of the payload in the notification headers as size would not take in account the real length of the UTF8 encoded characters.

Is it something that was known and is there better solution to do it ? If not would you like me to pretty it up and make a pull request ?

Anyway thank you for the gem :)

--
Sylvain