Commit cde645b0 authored by Pontus Freyhult's avatar Pontus Freyhult

* lyskom-rest.el (kom-save-text-body): Use coding system of text

for saving if available, or fall back to server default coding
system if not.
parent c3fc4072
2005-01-19 Pontus Freyhult <pont@soua.net>
* lyskom-rest.el (kom-save-text-body): Use coding system of text
for saving if available, or fall back to server default coding
system if not.
2005-01-18 Pontus Freyhult <pont@soua.net>
* swedish-strings.el: Added compatibility key bindings for XEmacs
......
......@@ -2864,7 +2864,15 @@ See `kom-save-text' for an alternative command."
(set-buffer buf)
(erase-buffer)
(insert str)
(write-region (point-min) (point-max) filename))
(let* ((cti (lyskom-get-aux-item (text-stat->aux-items text-stat) 1))
(content-type (and cti (aux-item->data (car cti))))
(charset (cdr (assoc 'charset
(cdr (lyskom-mime-decode-content-type
content-type)))))
(coding-system-for-write (or charset
lyskom-server-coding-system)))
(write-region (point-min) (point-max) filename)))
(lyskom-insert (lyskom-get-string 'done)))
(quit (lyskom-insert (lyskom-get-string 'cancelled)))
(error (lyskom-insert (lyskom-get-string 'nope))))))))))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment