can't save file with Windows-1251 characters

can't save file with Windows-1251 characters

Post by Haines Bro » Thu, 27 Dec 2007 22:39:22

I've pursued this before with little success.

In rmail, if a message contains a character from the Windows-1251, such
as substituting a curley closing quotation mark for an apostrophe, it is
displayed like this:

...Petrocaribebs New Objectives

Here the apostrophe, which for some reason the OP wanted to represent as
a curley single closing quotation mark using Windows-1251, appears as
the letter "b".

When I go to save this message, the curley "apostrophe" does not find a
match in my font (DejaVu) and so represents it in octal notation, which
looks like this:

...Petrocaribe\342\200\231s New Objectives

and I get a line in the minibuffer asking me in which coding system to
encode the text I'm saving. The default is raw test. When I save I get
the error:

These default coding systems were tried to encode text in the buffer
` rmail-output': (utf-8-unix (504 . 4194274) (505 . 4194176) (506 . 4194201))
However, each of them encountered characters it couldn't encode:
utf-8-unix cannot encode these: ?€ ?

Click on a character (or switch to this window by `C-x o'
and select the characters by RET) to jump to the place it appears,
where `C-u C-x =' will give information about it.

Select one of the safe coding systems listed below,
or cancel the writing with C-g and edit the buffer
to remove or modify the problematic characters,
or specify any other coding system (and risk losing
the problematic characters).


When I do as instructed, C-u C-x = returns, for example:

Char: \342 (4194274, #o17777742, #x3fffe2, raw-byte)
point=506 of 4512 (11%) column=0

And the information buffer offers:

character: ?(4194274, #o17777742, #x3fffe2)
preferred charset: eight-bit (Raw bytes 0-255)
code point: 0xE2
syntax: w which means: word
buffer code: #xE2
file code: not encodable by coding system utf-8-unix
display: no font available

Character code properties are not shown: customize what to show

There are text properties here:
rmail-fontified t

I asked before an got no answer that worked: how do I get emacs to
understand an octal notation for Windows-1251 characters and convert it
into something that is intelligible in plain ASCII, such as converting a
curley closing quotation mark to a apostrophe? Is the only option to put
a conversion table into .emacs to convert the octal notations associated
with Windows-1251 into something more useful? Can I find an example?

What does the line: "syntax: w which means: word" mean?


Haines Brown, KB1GRM

1. illegal character for encoding 'windows-1251'

2. displaying Windows-1251 files

I know this is a FAQ, but what I find is too old or simply doesn't work.

When I have a document using Window-1251 codepage, the Windows-1251
characters are displayed as raw octals, as in /223 for x93, quotation
mark. I installed emac23, and I thought this issue must surely have been
resolved by now.

I tried putting rs-ucs-coding-system.el into ~/elisp and these lines in
my load path:

(autoload 'rs-ucs-use-iso-8859 "rs-ucs-coding-system")
(autoload 'rs-ucs-use-windows-12xx "rs-ucs-coding-system")
(autoload 'rs-ucs-update-charset-synonyms "rs-ucs-coding-system")
(autoload 'rs-ucs-update-charset-eval-alist "rs-ucs-coding-system")

but it had no effect, and it also managed to break gnus.

Haines Brown, KB1GRM

3. "Windows-1251" encoding support in OFX files

4. Displaying Charset windows-1251

5. block windows-1251 junkmail

6. XML loading in Windows-1251 encoding

7. help utf-8 > windows-1251

8. tex2rtf and windows-1251 under linux

9. Cirilic (Windows-1251) fonts

10. An ENCODING problem: Windows-1251

11. UTF8 <-> windows 1251 conversion

12. windows - 1251

13. How to change CodePage from 1252 to 1250/1251 ?

14. (215) US-PA-Philadelphia-1251: Senior Applications Developer (8615)

15. Russian 1251 fonts in Debian