I think the cause of the problem is that encode_codin_ccl() does not call ccl_driver() for zero length string. Please see the attached patch. > When I start emacs (emacs-23 branch and trunk) with -Q and evaluate > below code, I receive unexpected result. > > (let ((string "")) > (define-ccl-program ccl-test > '(1 > ((read r0)) > ((write "[EOF]")))) > (make-coding-system 'ccl-test-cs 4 ?T "CCL_EOF_BLOCK tester" > '(ccl-test . ccl-test)) > (list > (ccl-execute-on-string 'ccl-test (make-vector 9 0) string) > (decode-coding-string string 'ccl-test-cs) > (encode-coding-string string 'ccl-test-cs))) > > It returns > ("[EOF]" "[EOF]" "") > But emacs22 returns > ("[EOF]" "[EOF]" "[EOF]") > and I expect such result. -- Kazuhiro Ito