This version doesn't rely on the default encoding (such as LANG
, LC_*
environment variables) but instead assumes encoding of read and written files to be UTF-8, which seems reasonable as the iCalendar standard specifies UTF-8 as the default anyways.