1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
Patch from Javier M Mora for fixing Emacs functionality
if character set of system is UTF-8 (Closes: #572779)
@@ -123,15 +123,16 @@
(interactive )
(let ((process-connection-type t))
(if (and festival-process
- (eq (process-status festival-process) 'run))
- 't
+ (eq (process-status festival-process) 'run))
+ 't
;;(festival-kill-festival t)
(message "Starting new synthesizer process...")
(sit-for 0)
(setq festival-process
- (start-process "festival" (get-buffer-create "*festival*")
- festival-program-name)))
- ))
+ (start-process "festival" (get-buffer-create "*festival*")
+ festival-program-name))
+ (set-process-coding-system festival-process 'iso-latin-1 'iso-latin-1)
+ festival-process) ))
(defun festival-kill-process ()
"Kill festival sub-process"
@@ -152,7 +153,8 @@
as a file in /tmp and then tells festival to say that file. The
major mode is *not* passed as text mode name to Festival."
(interactive "r")
- (write-region reg-start reg-end festival-tmp-file)
+ (let ((coding-system-for-write 'iso-latin-1))
+ (write-region reg-start reg-end festival-tmp-file))
(festival-send-command (list 'tts festival-tmp-file nil)))
(defun festival-say-buffer ()
@@ -160,7 +162,8 @@
as a file in /tmp and then tells festival to say that file. The
major-mode is passed as a text mode to Festival."
(interactive)
- (write-region (point-min) (point-max) festival-tmp-file)
+ (let ((coding-system-for-write 'iso-latin-1))
+ (write-region (point-min) (point-max) festival-tmp-file))
;; Because there may by sgml-like sub-files mentioned
;; ensure festival tracks the buffer's default-directory
(festival-send-command (list 'cd (expand-file-name default-directory)))
|