Closed t-sin closed 6 years ago
Oh, it's wrong way to use inquisitor.
inquisitor:detect-*
returns implementation independent name (e.g. :cp932
), and users can convert it into implementation dependent name (e.g. :sjis
on LispWorks) to use as external-format arround this commit 2b5b13a2c4b72220351a491b72c9242e8f7065cf.
In this case, that code should be like this:
(let ((external-format (inq:dependent-name (inq:detect-encoding (pathname pathname) :jp))))
...
Correct CP932 name on LispWorks is
:shift-sjis
, but inquisitor returns wrong name.Because of this, lem has a sadly hack:
https://github.com/cxxxr/lem/blob/8be6a9c91937af0b01bd4ca076104d3154935fc9/lem-core/file-ext.lisp#L66