-
Notifications
You must be signed in to change notification settings - Fork 25
Encoding problem #18
Comments
@wprzyb Hmm. I'm probably doing the wrong thing here, which is forcing the encoding at the attribute level rather than converting the whole response as Unicode. If you add this to your
If it does I'll prepare a fix for a new point version release. |
|
@wprzyb Ah, sorry. You may need to |
@wprzyb And I noticed a mistake I wrote in the original. First line should be |
I figured the missing space out, my config looks like this:
and still
|
It seems that IcalFeed is a class not a module. So: module Almanack
module EventSource
class IcalFeed
def entities
RiCal.parse_string(response.body.force_encoding('utf-8'))
end
end
end
end Not the prettiest code, but the monkey-patch should work. |
@Phitherek sweet! now it works for web ui, but still not for ics file:
|
Try this one: module Almanack
module EventSource
class IcalFeed
private def ical_event_for(event)
ical_event = RiCal.Event
ical_event.summary = event.title
ical_event.dtstart = event.start_time.new_offset(0)
ical_event.dtend = (event.end_time || event.start_time + default_event_duration ).new_offset(0)
ical_event.description = event.description if event.description
ical_event.location = event.location if event.location
ical_event
end
end
end
end Let me know if it works, I didn't test it. Of course you can add this to previous monkey-patch. |
@Phitherek - Same
|
Here is my ics i want to use - and the problem is with the encoding. I know only a bit of ruby, but all my attempts to inject some UTF-8 forcing into config.ru was unsuccessful:
The text was updated successfully, but these errors were encountered: