X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Thu, 07 Feb 2002 21:44:45 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Thomas Mueller" Message-Id: <563-Thu07Feb2002214445+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp AT delorie DOT com In-reply-to: (tmueller AT bluegrass DOT net) Subject: Re: GNU Emacs DOS (DJGPP) port converts upper-ASCII characters to ASCII 127 References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Thomas Mueller" > Newsgroups: comp.os.msdos.djgpp > Date: 7 Feb 2002 11:38:51 GMT > > The newsletter is actually in the German language, as opposed to English, and > specifies ISO-8859-1 charset. From the headers: > > Content-Type: text/plain; charset=iso-8859-1 Then "C-x RET c latin-1 RET C-x C-f file-name RET" should have worked. It does for me (I read all my email in Emacs, and it comes in many different languages, all of them displayed, saved, printed, and sent correctly). Alternatively, if you don't care about any language but German, invoke Emacs with the --unibyte switch. This will leave the 8-bit characters intact, but they probably won't be displayed correctly (since the DOS terminal cannot display Latin-1 characters encoded in 8859-1). > I did what you said (the latter, maybe not at the right time. But I had the > same problem even after adding to _EMACS > (set-terminal-coding-systsm 'iso-latin-1) terminal-coding-system has nothing to do with how the file is read and written. It only matters for how text is _displayed_. And you should never set it to latin-1, since the DOS terminal can only display one character set--the one defined by the currently installed codepage. > Also, with another file slightly exceeding 1.5 MB, DOS Emacs > couldn't determine line numbers See the variable line-number-display-limit. Emacs doesn't subdivide text into lines, so it needs to count lines if you request their display. For large files, this could slow down the display, so there's a limit, which you can change. > Linux version of Emacs, in text mode, non-X-Windows, showed the latin-1 > characters correctly That's because Latin-1 is the default on GNU/Linux. The DJGPP port's defaults are set up according to the installed codepage, so Latin-1 is a non-default encoding. Latin-1 comes from the Unix world, so it's not a surprise DOS programs have some difficulty with them. > A usage error, like I should have used vim 6 or elvis 2.1_4, or > maybe setedit, instead of Emacs? Vim never messed up the > upper-ASCII characters, nor did EPM in OS/2. Vim cannot mix several languages in the same buffer; Emacs can. The extra functionality comes at some price. However, that price should be viewed in a proper perspective. Think for a moment: you asked Emacs to display a file with non-ASCII characters encoded in some encoding that is totally alien to DOS. If you tell Emacs it's a Latin-1 file, you will see that file correctly displayed, even though DOS doesn't understand Latin-1, and even though DOS terminals cannot display Latin-1 characters (some of the Latin-1 glyphs are simply missing from the video ROM, others are in wrong places). What other editor can pull that trick? In addition, with Emacs, you can mix several different languages, like German, Polish, and Russian, in the same buffer, and have them all displayed correctly. (In the DJGPP version, unless you have Cyrillic characters built into your video ROM, the Russian part will look a bit awkward, but it still can be read by someone who speaks the language.) You can also type text in any language you want, even ones whose characters cannot be produced by your keyboard. What other DOS editor can do that? Can you type Russian with Vim? > Apparently a lot of people prefer vi and relatives over Emacs. A much larger number have opposite preferences. Try reading gnu.emacs.help or comp.emacs some day.