Character encoding in external public calendars - Why is Danish UTF-8 character not show correctly?
I am using a Danish holiday calendar with the following URL: http://www.avalonia.dk/ical/Helligdage-DK.ics
Some events in this calendar have names with non-English characters e.g. 2009-04-13: "2. Påskedag".
Even though the name seems to be correctly encoded as UTF-8 in the .ics file, Google Calendar does not show the name correct. It show "2. P skedag".
Can anyone help me resolve this?
The standard encoding for .ics as far as I can see is UTF-8.
However, external calendars that DO NOT publish in UTF-8, but rather identifies themselves as ANSI (and thereby showing erronius characters in the raw text, like Ã¶, Ã¥, Ã¤... ) DOES show up in Google Calendar with the correct characters. Very strange...
Is this a bug in Google Calendar, or am I missing something obvious?
Main reason for using an external calendar was that the google calendar was missing some holidays like easter.
I found this solution. You have to create this PHP file on your server:
* @return string
* @param string $url
* @desc Return string content from a remote file
* @author Luiz Miguel Axcar and Ondrej Svoboda
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
$string = ob_get_contents();
$content = get_content ("http://www.google.com/calendar/ical/YOUR_CALENDAR.ics");
header('Content-Type: text/calendar; charset=CP1250');
header('Content-Disposition: attachment; filename="calendar.ics"; ');
echo iconv("UTF-8", "CP1250//IGNORE", $content);
save it, for example as ../calendar.php
and then just put this file as a source of Google calendar in your external calendar application.
It loads your Google calendar, changes its encoding from UTF-8 to CP1250 (you can use different encoding, if you need) and returns calendar.ics file
RFC 5545 says that default charset for iCalendar is UTF-8 so it's clearly a bug in google calendar implementation.
Seems to be solved by using Comma Separated Values (Windows).
Will anyone volunteer to fetch http://www.avalonia.dk/ical/Helligdage-DK.ics ,
re-encoded version and get our non-US letters rendered correctly?
Some community members might have badges that indicate their identity or level of participation in a community.
Member levels indicate a user's level of participation in a forum. The greater the participation, the higher the level. Everyone starts at level 1 and can rise to level 10. These activities can increase your level in a forum:
- Post an answer.
- Having your answer selected as the best answer.
- Having your post rated as helpful.
- Vote up a post.
- Correctly mark a topic or post as abuse.
Having a post marked and removed as abuse will slow a user's advance in levels.
View profile in forum?
To view this member's profile, you need to leave the current Help page.
Report abuse in forum?
This comment originated in the Google Product Forum. To report abuse, you need to leave the current Help page.
Reply in forum?
This comment originated in the Google Product Forum. To reply, you need to leave the current Help page.