02 2014 档案

摘要:最近一直在学习用cl-closure-template处理模版,发现一个问题,当把模版函数保存在一个文件中,使用文件路径编译时,模版函数中的中文字符变为乱码,这个是cl-closure-template读取文件时使用了系统默认编码方式导致的(alexandria:read-file-into-string obj),要解决此问题,可以在cl-closure-template模块的src/parser/command.lisp的函数parse-template中加入指定编码方式的语句(红色部分):(defun parse-template (obj) (closure-template-par. 阅读全文
posted @ 2014-02-16 22:13 误会僧 阅读(408) 评论(0) 推荐(0) 编辑