1

I copied some math formulas into some files under gedit, using the default settings of gedit from websites, such as math.stackexchange.com, wikipedia, ...

When I open the files now under emacs, the encoding isn't correct.

What are some most likely encodings for the files?

E.g. Here is some text shown in emacs under utf-8:

Let f be a measurable function from (\246\270,F,\246\314) to (R,B(R)).                                                                 
then                                                                                                                                   
\246\314(|f|>t) as a function of t is Riemann integrable over [0,\241\336).                                                            
the expectation of the measure f induces on its codomain i.e. \241\322_\246\270 |f| d\246\314 = \241\322_[0,\241\336) \246\314(|f|>t) 

which are actually shown in gedit as:

Let f be a measurable function from (Ω,F,μ) to (R,B(R)). 
then
μ(|f|>t) as a function of t is Riemann integrable over [0,∞).
the expectation of the measure f induces on its codomain i.e. ∫_Ω |f| dμ = ∫_[0,∞) μ(|f|>t) 

How do you find out the encoding charset of the example text? Thanks.

2 Answers 2

0

How do you find out the encoding charset of the example text?

If you mean how to find the charset while the example text is open in emacs, then perhaps M-x describe-current-coding-system in emacs is what you're after?

1
  • Thanks. I don't ask for the encoding emacs uses to open the text file. I am asking what the correct encoding is to open the text.
    – Tim
    Commented Sep 26, 2014 at 17:15
0

If you need to find out the encoding of a particular file, you can use the file command:

$ cat findenc.txt 
Let f be a measurable function from (Ω,F,μ) to (R,B(R)). 
then
μ(|f|>t) as a function of t is Riemann integrable over [0,∞).
the expectation of the measure f induces on its codomain i.e. ∫_Ω |f| dμ = ∫_[0,∞) μ(|f|>t)
$ file findenc.txt 
findenc.txt: UTF-8 Unicode text
$ 

I'm not sure what version of emacs you're using, but the file automatically looks right to me in emacs24 and emacs23, as well as gedit and vi, without having to change any settings (Ubuntu 14.04).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .