Mindbowser / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

Character encoding of the payload #59

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
I'm trying to send a message to iPhone or iPad devices but the encoding message 
appears wrong.

What is the expected output? What do you see instead?
Atención ñoño instead of receiving this message, I receive AtenciA~3n A+oA+o

What version of the product are you using? On what operating system?
javapns-jdk16-169.jar on Windows XP

Please provide any additional information below.
I think that the problem is located in the method getPayloadAsBytes(). In this 
method enconding of message with UTF-8 instead of ISO-8859-1

Any idea? Any help I would be very greatful, 
Thanks,
Daniel Palacios

Original issue reported on code.google.com by daniel.p...@alamoconsulting.com on 29 Jul 2011 at 9:27

GoogleCodeExporter commented 8 years ago
Under 'Passing the Provider the Current Language Preference (Remote 
Notifications)'
on page:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Concept
ual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html#//apple_ref/d
oc/uid/TP40008194-CH103-SW3

It is implied that the payload should be UTF-8.

Or are you asking for loc-key and loc-args to be suppored?

Original comment by idbill.p...@gmail.com on 3 Aug 2011 at 2:56

GoogleCodeExporter commented 8 years ago

Original comment by sype...@gmail.com on 9 Sep 2011 at 7:11

GoogleCodeExporter commented 8 years ago
Apple documentation suggests that payload content should be UTF-8.  There is no 
reference to ISO-8859-1... I have nonetheless modified the Payload class in 
javapns 2.0 Beta 2 revision 003 (available in svn only for now) so that the 
character encoding used by getPayloadAsBytes can be customized to meet specific 
needs.

Original comment by sype...@gmail.com on 14 Sep 2011 at 7:13