help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

recognizing coding systems


From: Alexandru Cardaniuc
Subject: recognizing coding systems
Date: Wed, 03 Nov 2004 03:56:21 +0300

Hi All!

The emacs manual says:

"   The priority list of coding systems depends on the selected language
environment (*note Language Environments::).  For example, if you use
French, you probably want Emacs to prefer Latin-1 to Latin-2; if you use
Czech, you probably want Latin-2 to be preferred.  This is one of the
reasons to specify a language environment.
   However, you can alter the priority list in detail with the command
`M-x prefer-coding-system'.  This command reads the name of a coding
system from the minibuffer, and adds it to the front of the priority
list, so that it is preferred to all others.  If you use this command
several times, each use adds one element to the front of the priority
list."

I added these lines to my .emacs file:

(prefer-coding-system 'koi8-r)
(prefer-coding-system 'cp866)
(prefer-coding-system 'cp1251)

after I run the command describe-coding-system I get this:

-------------------------------------
Coding system for saving this buffer:
  - -- undecided-unix
Default coding system (for new files):
  D -- cp1251 (alias: windows-1251 microsoft-1251 microsoft-cp1251 
windows-cp1251 win-1251 win-cp1251)
Coding system for keyboard input:
  nil
Coding system for terminal output:
  1 -- iso-latin-1 (alias: iso-8859-1 latin-1)
Defaults for subprocess I/O:
  decoding: D -- cp1251 (alias: windows-1251 microsoft-1251 microsoft-cp1251 
windows-cp1251 win-1251 win-cp1251)
  encoding: D -- cp1251 (alias: windows-1251 microsoft-1251 microsoft-cp1251 
windows-cp1251 win-1251 win-cp1251)

Priority order for recognizing coding systems when reading files:
  1. cp1251 (alias: windows-1251 microsoft-1251 microsoft-cp1251 windows-cp1251 
win-1251 win-cp1251)
  2. iso-latin-1 (alias: iso-8859-1 latin-1)
  3. iso-2022-jp (alias: junet)
  4. iso-2022-7bit 
  5. iso-2022-7bit-lock (alias: iso-2022-int-1)
  6. iso-2022-8bit-ss2 
  7. emacs-mule 
  8. raw-text 
  9. japanese-shift-jis (alias: shift_jis sjis)
  10. chinese-big5 (alias: big5 cn-big5)
  11. no-conversion (alias: binary)
  12. mule-utf-8 (alias: utf-8)

  Other coding systems cannot be distinguished automatically
  from these, and therefore cannot be recognized automatically
  with the present coding system priorities.
-----------------------------------------

Only the last prefer-coding-system command appears on the priority
list for recognizing coding systems. Am I doing something wrong?

other coding systems related commands in my .emacs file are:
--------------------------------------------------------
(codepage-setup 866)
(codepage-setup 1251)

(define-coding-system-alias 'windows-1251 'cp1251)
(define-coding-system-alias 'microsoft-1251 'cp1251)
(define-coding-system-alias 'microsoft-cp1251 'cp1251)
(define-coding-system-alias 'windows-cp1251 'cp1251)
(define-coding-system-alias 'win-1251 'cp1251)
(define-coding-system-alias 'win-cp1251 'cp1251)
(define-coding-system-alias 'koi8-u 'cyrillic-koi8)
(define-coding-system-alias 'KOI8-R 'cyrillic-koi8)
(define-coding-system-alias 'koi8 'cyrillic-koi8)

;; selecting language environment
(set-language-environment 'Cyrillic-KOI8)
---------------------------------------------------------

Using emacs for Windows 21.3

-- 
Sincerely yours,
Alexandru Cardaniuc





reply via email to

[Prev in Thread] Current Thread [Next in Thread]