[Top][All Lists]

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

Unsafe coding system

From: Ehud Karni
Subject: Unsafe coding system
Date: Wed, 7 Nov 2001 21:53:02 +0200

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list.

In GNU Emacs (i686-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2001-11-02 on beta
configured using `configure  --host=i686-redhat-linux-gnu --with-pop 
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I have a file that contain on its 1st lines this text:

;; -*- mode: emacs-lisp; coding: hebrew-iso-8bit-unix -*-
;;              EHUD   KARNI            ˆיˆנˆרˆק   ˆדˆוˆהˆא
;;              Ben Gurion st'   14   ˆןˆוˆיˆרˆוˆג ˆןˆב 'ˆחˆר
;;              Kfar - Sava    44 257     ˆאˆבˆס - ˆרˆפˆכ
;;              ===================================
;;              <address@hidden>  972-(0)9-7659599
;;              ===================================

I did some change (typed space where there was a space before) and
tried to save it. I got this warning:

 | These default coding systems were tried:
 |   hebrew-iso-8bit-unix
 | However, none of them safely encodes the target text.
 | Select one of the following safe coding systems:
 |   raw-text emacs-mule no-conversion

And I must choose 1 of the 3 options above.
It does not matter what my choice was, After I kill the buffer and
re-visit the file, it looks like this:

;; -*- mode: emacs-lisp; coding: hebrew-iso-8bit-unix -*-
;;              EHUD   KARNI            ˆˆיˆˆנˆˆרˆˆק   ˆˆדˆˆוˆˆהˆˆא
;;              Ben Gurion st'   14   ˆˆןˆˆוˆˆיˆˆרˆˆוˆˆג ˆˆןˆˆב 'ˆˆחˆˆר
;;              Kfar - Sava    44 257     ˆˆאˆˆבˆˆס - ˆˆרˆˆפˆˆכ
;;              ===================================
;;              <address@hidden>  972-(0)9-7659599
;;              ===================================

The cause is an Hebrew Alef in M$DOS coding (\x80) that was in the
file when it was read in the 1st time.

The problem is: Although I did non significant change (replaced space
by space) the saved file changed a lot and the cause of it (\x80) still
remained in the problematic state.

What I want: I want to be able to save it in UNSAFE way. i.e. I want
to save it as hebrew-iso-8bit and the characters that can't be encoded
by this coding system will be left AS IS (8 bit).

Reason for seemingly unsafe request above: I work in a very mixed
environment (DOS, Windows, UNIX). We deal with Hebrew in many coding
system (DOS: Hebrew in \x80-\x9A, OLDCODE: Hebrew in \x60-\x7A, M$WIN
and UNIX: Hebrew in \xE0-\xFA and also EBCDIC). We read and produce
files in all these formats. The only alternative to the requested
"UNSAFE" mode above is working with binary (no-conversion) coding
system for all files (which I don't think is more safe), This is the
way we worked until 21.1.


 Ehud Karni     Mivtach - Simon  Insurance   /"\
 Tel: +972-3-7966-561 Fax: +972-3-7966-667   \ /  ASCII Ribbon Campaign
 (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
     Better     Safe     Than     Sorry      / \
     mailto:address@hidden    http://www.simonwiesel.co.il

reply via email to

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