1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
;;; 1
(defun sjis-to-euc-jp (bytes)
  (convert-string-to-bytes
   (convert-string-from-bytes bytes charset:shift-jis)
   charset:euc-jp))

;;; 2
(defun sjis-to-euc-jp-file (from to)
  (with-open-file (in from :direction :input
                     :external-format charset:shift-jis)
    (with-open-file (out to :direction :output
                         :external-format charset:euc-jp)
      (do () ((null (listen in)))
        (write-line (read-line in) out)))))