1

How do I open a German UTF-8 document in xemacs 21.4 patch 22?

(Example: The Project Gutenberg EBook of Faust: Der Tragödie zweiter Teil, by Johann Wolfgang von Goethe)

The manual suggests using: M-x set-language-environment

http://www.gnu.org/software/emacs/manual/html_node/emacs/Language-Environments.html

But my xemacs doesn't know about M-x set-language-environment (the nearest auto-complete is set-left-margin!)

The text file uses byte order marks (i.e. starts u'\ufeff')

How can I make it display correctly?

Michael Grazebrook
  • 5,361
  • 3
  • 16
  • 18

1 Answers1

0

As long as you have a mule build:

With (require 'un-define) in your ~/.xemacs/init.el (or elsewhere appropriate) you can use

M-x set-file-buffer-coding-system-for-read RET utf-8 RET

and then open the file normally with C-x C-f. Though I always got ^M line endings, even with utf-8-dos explicitly specified. Those can be gotten rid of with dos2unix or within xemacs.

Johann Oskarsson
  • 776
  • 6
  • 15
  • My problem then is that I may not have a mule build. The command you give doesn't exist in my xemacs. I don't know how to check if I have a mule build. help apropos mule returns 1 function and 3 variables. – Michael Grazebrook Aug 09 '13 at 13:50
  • I work on a Windows box, I added this line to my custom.el to make it work: (set-default-file-coding-system 'undecided-dos). That makes dos files display nicely for me. – Michael Grazebrook Aug 09 '13 at 13:52