> (while (string-match "\\^\\{2,\\}\\(\\([EMAIL > PROTECTED])\\|[8-9a-f][0-9a-f]\\)" > string) > (setq output > (concat output > (regexp-quote (substring string > 0 > (- (match-beginning 1) 2))) > (if (match-beginning 2) > (concat > "\\(?:" (regexp-quote > (substring string > (- (match-beginning 1) 2) > (match-end 0))) > "\\|" > (char-to-string > (logxor (aref string (match-beginning 2)) 64)) > "\\)") > (char-to-string > (string-to-number (match-string 1 string) 16)))) > string (substring string (match-end 0)))) > (setq output (concat output (regexp-quote string))) > (if (featurep 'mule) > (prog2 > (message "%S %S " output buffer-file-coding-system) > (setq output (decode-coding-string output > buffer-file-coding-system)) > (message "%S\n" output)) > output)))
The problem is that by passing `output' to decode-coding-string you clearly consider `output' to be a sequence of bytes. But to construct `output' you use pieces of `string' so you have to make sure that `string' is also a sequence of bytes. Assuming `string' comes from the TeX process, you can do that by making sure that that process's output coding system is `binary' (or `raw-text' if you want EOL-conversion). Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel