notes icon indicating copy to clipboard operation
notes copied to clipboard

how to generate feed entry for nonlatin document

Open linusboyle opened this issue 3 years ago • 2 comments

Hi there, I'd like to use this repo as a starting point for my blog, part of which is in Chinese. However the title and summary of these documents in the Atom feed generated are garbled like this:

<entry>
    <title><#9E3F><#722A><#30FB>2021<#5E74>8<#6708></title>
    <link rel="alternate" type="text/html" hreflang="en" href="http://texmacs.github.io/notes/docs/record-2021-08.html"/>
    <id>texmacs.github.io/notes/record-2021-08.tm:2021-12-26T12:23:48Z</id>
    <updated>2021-12-26T12:23:48Z</updated>
    <published>2021-12-26T12:23:48Z</published>
    <summary><document><#300A><#4E2D><#56FD><#8BDD><#300B></document></summary>
  </entry>

Not so familiar with lisp, so I'm wondering if there's a function that can decode these.

linusboyle avatar Dec 30 '21 13:12 linusboyle

Probably they have to be converted to unicode. You might try to put somewhere a call to (cork->utf8 ...)

mgubi avatar Jan 11 '22 17:01 mgubi

Probably here:

(define (make-article-list-entry mdate cdate file title abs)
    `(notes-entry ,file 
        ,(if (null? title) "(no title)" (cork->utf8 (car title)))
        ,(if (null? abs) "(no abstract)" (car abs))
        ,(strftime "%c %Z"  (localtime mdate "UTC"))))

mgubi avatar Jan 11 '22 17:01 mgubi