Author Topic: google calenendar doesn't recognize spezial characters  (Read 4192 times)

chuelibrueder

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
google calenendar doesn't recognize spezial characters
« on: July 27, 2010, 05:03:03 AM »
I'm trying to read a calendar into google calendar using the ical link at the top right corner. Basically it works, but google calender doesn't seem to read the file as utf-8 encoded. This means that all my german character () end up looking like this "��".

According to some forum aswer something like this needs to be added to the header

Code: [Select]
header('Content-type: text/calendar; charset=UTF-8');
header("Content-Disposition: inline; filename=$cal");

but I really don't know where to add this.

Does anyone else have this problem?

Is there a solution for this?

Greetings
chuelibrueder

chuelibrueder

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: google calenendar doesn't recognize spezial characters
« Reply #1 on: July 27, 2010, 07:37:42 PM »
I found myself a work arround, this will probably break the ical feed and export for most other ical clients, but since I only use it in google calendar I don't care. It seems to be a bug with google calendar which hasn't been fixed for the last two years.

Anyway, I replaced

Code: [Select]
return $ical_info;
with

Code: [Select]
$umlaut = array("", "", "", "", "", "");
$vokal = array("ü", "ä", "ö", "Ü", "Ä", "Ö");

$ical_info_latin = str_replace($umlaut, $vokal, utf8_decode($ical_info));

return $ical_info_latin;

pretty much at the end of CalFormatUtilities.php

chuelibrueder

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: google calenendar doesn't recognize spezial characters
« Reply #2 on: August 02, 2010, 06:16:37 AM »
Just to complete the story.

After fixing this first bug with google calendar I noticed an other bug with google calendar. The timezone was not accepted by google so the dates where read as if they were greenich mean time, and the time was always of by an hour (depending on where you are). This too is a well known bug of google calendar, which hasn't been fixed for years. I guess I could have fixed that too by writing some code to add the appropriate number of hours to the feed. But then I noticed yet an other problem. The feed is cached by google calendar and only refreshed about every 24 hours, also changes on existing dates are never checked for. After this I was so pissed of I just couldn't be bothered anymore.

Really the only thing I wanted, was to feed the dates to my windows mobile phone. The solution I now have works very well, without any bug: I'm feeding the calendar into Lightning (Thunderbird Calendar Add on) and then from there by Birdiesync to my mobile phone. It doesn't work over the air, but at least it works. If anyone needs any help with this solution, just post a note, I'm happy to help

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: google calenendar doesn't recognize spezial characters
« Reply #3 on: August 03, 2010, 04:53:31 PM »
Hi chuelibrueder,

Thanks for sharing this!

cloo

  • Freshman
  • *
  • Posts: 43
    • View Profile
    • cloo
Re: google calenendar doesn't recognize spezial characters
« Reply #4 on: December 07, 2010, 04:56:12 PM »
well, nice to see you can deal with this.
But this solution is only for German umlauts, right? And I should add characters of my language to the array. 
Where did you get these from?
Code: [Select]
[i][i] ü", "ä", "ö", "Ü", "Ä", "Ö" ? [/i][/i]I need the  equivalents for ą, ę, ė, ų, ū, į, č, , .