From f55d6ec9427814b330da3079acf5ccb301e2723e Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 2 Sep 2024 19:06:30 +0200 Subject: always decode ICal::Data strings (apparently is raw bytes) --- lib/Object/Groupware/Event.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Object/Groupware/Event.pm b/lib/Object/Groupware/Event.pm index 2ab3586..e877b50 100644 --- a/lib/Object/Groupware/Event.pm +++ b/lib/Object/Groupware/Event.pm @@ -20,9 +20,9 @@ field $span; field $start : reader = $entry->start; field $end : reader = $entry->end; -field $summary : reader = $entry->summary; -field $description : reader = $entry->description || ''; -field $location : reader = $entry->_simple_property('location'); +field $summary : reader = decode_utf8 $entry->summary; +field $description : reader = decode_utf8 $entry->description || ''; +field $location : reader = decode_utf8 $entry->_simple_property('location'); field $price : reader; field @attendees; field @attachments; @@ -50,14 +50,14 @@ ADJUST { if ( $entry->property('attendee') ) { for ( @{ $entry->property('attendee') } ) { - push @attendees, $_->parameters->{'CN'} - || $_->value =~ s/^mailto://r; + push @attendees, decode_utf8( $_->parameters->{'CN'} ) + || decode_utf8( $_->value =~ s/^mailto://r ); } } if ( $entry->property('attach') ) { for ( @{ $entry->property('attach') } ) { my $uri; - try { $uri = URI->new( $_->value ) } + try { $uri = URI->new( decode_utf8 $_->value ) } catch ($e) { $log->errorf( 'failed to parse URI %s: %s', $uri, $e ); next; -- cgit v1.2.3