 (defun edit-server-accept (server client msg)
   "Accept a new client connection."
   (let ((buffer (generate-new-buffer edit-server-process-buffer-name)))
+    (and (fboundp 'set-buffer-multibyte)
+         (set-buffer-multibyte t)) ; djb
     (buffer-disable-undo buffer)
     (set-process-buffer client buffer)
     (set-process-filter client 'edit-server-filter)

;; uncomment to debug
;(setq debug-on-error 't)
;(setq edebug-all-defs 't)

;; Customization
(defcustom edit-server-port 9292

  (let ((buffer (generate-new-buffer (if edit-server-url
					 edit-server-url
				       edit-server-edit-buffer-name))))
    (with-current-buffer buffer
      (and (fboundp 'set-buffer-multibyte)
           (set-buffer-multibyte t))) ; djb
    (copy-to-buffer buffer (point-min) (point-max))
    (with-current-buffer buffer
      (not-modified)
