Ver Fonte

Allow the server to send correct Unicode to Chrome.

Ryszard Szopa há 14 anos atrás
pai
commit
0cd3ab5f92
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      edit-server.el

+ 4 - 2
edit-server.el

@@ -363,9 +363,11 @@ and its buffer are killed with `edit-server-kill-client'."
 				(process-send-string proc response-header)
 				(process-send-string proc "\n")
 				(cond
-				 ((stringp body) (process-send-string proc body))
+				 ((stringp body) (process-send-string proc (encode-coding-string body 'utf-8)))
 				 ((not body) nil)
-				 (t (process-send-region proc (point-min) (point-max))))
+				 (t (progn 
+							(encode-coding-region (point-min) (point-max) 'utf-8)
+							(process-send-region proc (point-min) (point-max)))))
 				(process-send-eof proc)
 				(if close 
 						(edit-server-kill-client proc))