(use gauche.charconv)

;; 1
(define (sjis2eucjp str)
  (ces-convert str 'sjis 'eucjp))

;; 2
(define (sjis2eucjp-file infile outfile)
  (call-with-input-file infile
    (lambda (in)
      (call-with-output-file outfile
        (lambda (out) (copy-port in out))
        :encoding 'eucjp))
    :encoding 'sjis))
