diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-03-18 23:30:24 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-03-18 23:30:24 +0100 |
commit | 1dcdea5a09358eee85be05287d5c4cbbb3df6a94 (patch) | |
tree | fa6db78cf89fac4d30b917cafe040de6d09caf19 | |
parent | Remove red colouring of last day in week, since that might not be sunday. (diff) | |
download | calp-1dcdea5a09358eee85be05287d5c4cbbb3df6a94.tar.gz calp-1dcdea5a09358eee85be05287d5c4cbbb3df6a94.tar.xz |
Handle non-utf summaries.
Diffstat (limited to '')
-rw-r--r-- | module/vcomponent/parse.scm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/module/vcomponent/parse.scm b/module/vcomponent/parse.scm index ef31cbd0..11aa8dec 100644 --- a/module/vcomponent/parse.scm +++ b/module/vcomponent/parse.scm @@ -182,11 +182,25 @@ row ~a column ~a ctx = ~a (set! component (parent component))] - [else + [else ; Regular key-value line ;; TODO repeated keys (let ((it (make-vline str (get-param-table ctx)))) ;; Type specific processing (case (get-line-key ctx) + ;; As far as I can tell the RFC says nothing about special + ;; encoding for individual fields. It mentieons UTF-8, and + ;; that transfer encoding should be set in the mime-headers. + ;; That however seems like a breach of abstractions. + ;; Currently I allow a CHARSET property on SUMMARY fields, + ;; since I know that at least www.lysator.liu.se/alma/alma.cgi + ;; uses it. + [(SUMMARY) + (cond [(and=> (prop it 'CHARSET) car) + => (lambda (encoding) + (set! (value it) + (strbuf->string strbuf ((@ (rnrs io ports) make-transcoder) + encoding))))])] + [(DTSTART DTEND RECURRENCE-ID) ;; '("Africa/Ceuta" "Europe/Stockholm" "local") |