How to make emacs display a multibyte encoded file, right? Is that a mule?

When I open a multibyte file, I get the following:

alt text

+4
source share
3 answers

If memory is in use, Emacs will offer the user an encoding if it cannot determine it. When he makes the wrong definition, you can use

Cx RET f coding RET 

which will use coding as a coding system for the visited file in the current buffer.

+5
source

In the short term, you can return to the file using an alternative coding system using revert-buffer-with-coding-system (then select utf-16le).

Average, you can increase the priority of this utf-16le encoding when booting with prefer-coding-system .

In the long run, you should try to understand why emacs did not choose the correct encoding. I am not sure how I can help there, although I don’t need to dig inside the gut of the coding system or at least have a file to play.

EDIT: Does this file have a BOM ?

+11
source

In XML files, Emacs accepts this as a serial number, while Windows accepts this as a serial number.

 <?xml version="1.0" encoding="UTF-16"?> <hi /> 

Trying something like encoding = "UTF-16LE" will corrupt the xml file.

0
source

All Articles