3

如何(:crlf :|cp932|)在 ECL 上指定外部格式(例如 )?

我想用某种编码将字符串写入文件。所以我像这样输入我的 REPL:

(with-open-file (out "test.txt"
                 :direction :output
                 :external-format '(:crlf :|cp932|))
  (write-string "some string" out))

然后调用调试器并显示:

The function EXT:MAKE-ENCODING is undefined.
   [Condition of type UNDEFINED-FUNCTION]

这是错误的方式……?当外部格式为:utf-8时,成功写入...

  • ECL 版本 -- 15.3.7
  • 操作系统——Ubuntu 14.04
4

2 回答 2

3

基于§19.1.3。手册中的外部格式,看起来适当的符号实际上被命名为“CP819”并且在以“EXT”命名的包中,所以你应该使用ext:cp819,而不是:|cp819| . 您可以使用(:crlf ext:cp819),例如:

(with-open-file (out "test.txt"
                 :direction :output
                 :external-format '(:crlf ext:cp932))
  (write-string "some string" out))
于 2015-04-15T15:04:35.447 回答
1

请回退到 ECL 15.2.21 或使用 git head - 这是 15.3.7 中引入的错误

于 2015-08-06T15:49:13.980 回答