PHP app to send UTF-8 characters to Prowl.app

An iPhone client for Growl available on the App Store.
charlesso
Harmless
Posts: 10
Joined: Sat Sep 03, 2011 10:28 am

PHP app to send UTF-8 characters to Prowl.app

Postby charlesso » Thu Oct 18, 2012 5:29 pm

My PHP applications takes UTF-8 characters and send/receive/display them in a web browser. I can type in UTF-8 characters such as Chinese, Japanese, and the application will receive them and display them correctly.

Just before the UTF-8 characters are displayed, they are sent off to Prowl. However, Prowl will always display garbled characters.

I tried to confirm the strings are indeed in UTF-8 (after reading the comments in http://php.net/manual/en/function.utf8-encode.php), I used the function mb_check_encoding() and the result is indeed UTF-8.

Am I missing something here? What can I do to fix this?

User avatar
zac
Cocoaforge Admin
Posts: 1518
Joined: Sun Mar 27, 2005 3:19 pm
Contact:

Re: PHP app to send UTF-8 characters to Prowl.app

Postby zac » Fri Oct 19, 2012 3:58 am

Can you post a full HTTP request of the headers you're sending?

charlesso
Harmless
Posts: 10
Joined: Sat Sep 03, 2011 10:28 am

Re: PHP app to send UTF-8 characters to Prowl.app

Postby charlesso » Fri Oct 19, 2012 7:46 am

I manage to get the header, but not sure if it is the same header I get after sending the UTF-8 characters.


Array
(
[0] => HTTP/1.1 200 OK
[1] => Date: Fri, 19 Oct 2012 07:42:43 GMT
[2] => Server: Apache
[3] => ETag: "55632-3eb-4cc23a67d6500"
[4] => Accept-Ranges: bytes
[5] => Content-Length: 1003
[6] => Cache-Control: max-age=60
[7] => Expires: Fri, 19 Oct 2012 07:43:43 GMT
[8] => MS-Author-Via: DAV
[9] => Last-Modified: Tue, 16 Oct 2012 02:09:56 GMT
[10] => Connection: close
[11] => Content-Type: text/html
)



Thanks!
Last edited by charlesso on Sat Oct 20, 2012 12:54 am, edited 1 time in total.

charlesso
Harmless
Posts: 10
Joined: Sat Sep 03, 2011 10:28 am

Re: PHP app to send UTF-8 characters to Prowl.app

Postby charlesso » Fri Oct 19, 2012 1:56 pm

Finally nailed down the issue that causes the garbled display.

It is the PHP package that I use to send the message that ruined the characters.

The package developer enhanced the code, and now it seems to be working.

Thanks!


Return to “Prowl”

Who is online

Users browsing this forum: No registered users