[Top][All Lists]

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

Re: How to save a file with embedded unicode maths symbols

From: Eli Zaretskii
Subject: Re: How to save a file with embedded unicode maths symbols
Date: Tue, 10 Mar 2020 16:43:46 +0200

> From: Pieter van Oostrum <>
> Date: Tue, 10 Mar 2020 11:43:26 +0100
> > I have:
> >
> > GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
> >  of 2019-04-13
> >
> > I have not made any specific encoding config changes as far as I am aware.
> >
> > Yes I opened the file in emacs.
> >
> > Is there an emacs option to switch to utf-8 encoding when I view the file?
> Yes. You can use  C-x RET c (universal-coding-system-argument), then specify 
> utf-8, and the give the command to open the file (like C-x C-f).
> If you regularly work with utf-8 files (something I would recommend) then it 
> is easier to set utf-8 as your preferred encoding. As it seems this is 
> currently not the case, check your LANG environment variable or related ones. 
> It may specify something that causes latin-1 or so to be the default 
> encoding. As you experience, latin-1 or even Windows-1252 (which is an 
> extension of latin-1) are not sufficient for today's international/scientific 
> environment. More specifically, it cannot encode the Φ.

Since the OP is on Windows, the LANG variable cannot possibly help
(it's unset on Windows, and you cannot set to anything whose codeset
is UTF-8 anyway), and making UTF-8 the preferred encoding is not
recommended.  Instead, I suggest using file-local variables or coding
cookie (or .dir-locals.el, if this should hold for more than a couple
of files in the same directory).

reply via email to

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