[GData Protocol] Re: International special characters show up garbled with PHP / Zend

2009-04-09 Thread Jeff Fisher
Fair enough, I suppose this could be a problem with the PHP client library,
in which case you should file your test case to reproduce here:

http://framework.zend.com/issues/

As an issue against Zend_Gdata.

Cheers,
-Jeff

On Wed, Apr 8, 2009 at 6:17 PM, Bill williamfrederickbenn...@gmail.comwrote:


 Jeff,

 My understanding is that this is not a calendar-specific problem.  I
 believe it is a question of the data protocol and would occur whether
 I was reading a Calendar, Blog, Contact, YouTube post, etc.  I could
 be wrong ... perhaps I should mock up an example in something other
 than calendar.

 The test: create any content in Google data containing the French
 character œ (or anything else in the ISO-8859-15 and not in 8859-1)
 and echo that content to the browser using PHP / Zend.

 Thank you,
 Bill
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Data Protocol group.
To post to this group, send email to google-help-dataapi@googlegroups.com
To unsubscribe from this group, send email to 
google-help-dataapi+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~--~~~~--~~--~--~---



[GData Protocol] Re: International special characters show up garbled with PHP / Zend

2009-04-08 Thread Bill

Ah, it seems I have to use utf8_decode().  Is that correct?

For example, I updated the outputCalendar() function found in the
developer's guide / getting started (http://code.google.com/apis/
calendar/docs/1.0/developers_guide_php.html) to print the $event-
title-text with utf8_decode();

Does this look like how I should get decoded data back out of Google
to stuff into my database?  That certainly seems to work when printing
to the browser.

Thanks,
Bill

-

function outputCalendar($client)
{
  $gdataCal = new Zend_Gdata_Calendar($client);
  $eventFeed = $gdataCal-getCalendarEventFeed();
  echo ul\n;
  foreach ($eventFeed as $event) {
echo \tli . utf8_decode($event-title-text) .   ( . $event-
id-text . )\n;
echo \t\tul\n;
foreach ($event-when as $when) {
  echo \t\t\tliStarts:  . $when-startTime . /li\n;
}
echo \t\t/ul\n;
echo \t/li\n;
  }
  echo /ul\n;
}

outputCalendar($client);


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Data Protocol group.
To post to this group, send email to google-help-dataapi@googlegroups.com
To unsubscribe from this group, send email to 
google-help-dataapi+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~--~~~~--~~--~--~---



[GData Protocol] Re: International special characters show up garbled with PHP / Zend

2009-04-08 Thread Bill

Hmm, but utf8_decode() only handles ISO_8859-1 which doesn't include
some French and Dutch characters.  (http://en.wikipedia.org/wiki/
ISO_8859-1)  Perhaps I can use iconv with ISO-8859-15?

---

If I create an event called Test: Œ, œ, Ÿ, Š, š, Ž, ž, everything is
fine on the web site, google accepts it, renders it just fine.

If I then update my outputCalendar() function to use iconv('UTF-8',
'ISO-8859-15', $event-title-text), then I get the following event
title:

 Test: ¼, ½, ¾, ¦, ¨, ´, 

Thank you,
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Data Protocol group.
To post to this group, send email to google-help-dataapi@googlegroups.com
To unsubscribe from this group, send email to 
google-help-dataapi+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~--~~~~--~~--~--~---



[GData Protocol] Re: International special characters show up garbled with PHP / Zend

2009-04-08 Thread Jeff Fisher
Please post Calendar-specific bugs/problems to the Calendar API forum:

http://groups.google.com/group/google-calendar-help-dataapi

Cheers,
-Jeff

On Wed, Apr 8, 2009 at 11:31 AM, Bill williamfrederickbenn...@gmail.comwrote:


 Hmm, but utf8_decode() only handles ISO_8859-1 which doesn't include
 some French and Dutch characters.  (http://en.wikipedia.org/wiki/
 ISO_8859-1 http://en.wikipedia.org/wiki/%0AISO_8859-1)  Perhaps I can
 use iconv with ISO-8859-15?

 ---

 If I create an event called Test: Œ, œ, Ÿ, Š, š, Ž, ž, everything is
 fine on the web site, google accepts it, renders it just fine.

 If I then update my outputCalendar() function to use iconv('UTF-8',
 'ISO-8859-15', $event-title-text), then I get the following event
 title:

 Test: ¼, ½, ¾, ¦, ¨, ´, 

 Thank you,
 Bill
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Data Protocol group.
To post to this group, send email to google-help-dataapi@googlegroups.com
To unsubscribe from this group, send email to 
google-help-dataapi+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~--~~~~--~~--~--~---