Encoding issue for French text
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
My problem: With my Emacs 26.1 on my 10.13.6 Mac, I have a opened a third-party text file, and it turns out I have the wrong encoding set : the text is in French , and the accentuated characters are displayed incorrectly (thus "é" is displayed as a brown 216, "î" as a brown 224, etc).
What I tried : I tried
M-x revert-buffer-with-coding-system latin-1
andM-x revert-buffer-with-coding-system utf-8 emacs
and nothing changed in the display.
I also tried (and failed) to guess the encoding : it must be an encoding in which "é" is the 216th character. Now é is U+00E9 in Unicode, which gives 233 in decimal. Also é is number 130 in extended ASCII.
character-encoding
add a comment |Â
up vote
1
down vote
favorite
My problem: With my Emacs 26.1 on my 10.13.6 Mac, I have a opened a third-party text file, and it turns out I have the wrong encoding set : the text is in French , and the accentuated characters are displayed incorrectly (thus "é" is displayed as a brown 216, "î" as a brown 224, etc).
What I tried : I tried
M-x revert-buffer-with-coding-system latin-1
andM-x revert-buffer-with-coding-system utf-8 emacs
and nothing changed in the display.
I also tried (and failed) to guess the encoding : it must be an encoding in which "é" is the 216th character. Now é is U+00E9 in Unicode, which gives 233 in decimal. Also é is number 130 in extended ASCII.
character-encoding
That 216 is in octal => 142 decimal (but I have no clue which encoding it's using). It's not cp863 either.
– rpluim
2 hours ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
My problem: With my Emacs 26.1 on my 10.13.6 Mac, I have a opened a third-party text file, and it turns out I have the wrong encoding set : the text is in French , and the accentuated characters are displayed incorrectly (thus "é" is displayed as a brown 216, "î" as a brown 224, etc).
What I tried : I tried
M-x revert-buffer-with-coding-system latin-1
andM-x revert-buffer-with-coding-system utf-8 emacs
and nothing changed in the display.
I also tried (and failed) to guess the encoding : it must be an encoding in which "é" is the 216th character. Now é is U+00E9 in Unicode, which gives 233 in decimal. Also é is number 130 in extended ASCII.
character-encoding
My problem: With my Emacs 26.1 on my 10.13.6 Mac, I have a opened a third-party text file, and it turns out I have the wrong encoding set : the text is in French , and the accentuated characters are displayed incorrectly (thus "é" is displayed as a brown 216, "î" as a brown 224, etc).
What I tried : I tried
M-x revert-buffer-with-coding-system latin-1
andM-x revert-buffer-with-coding-system utf-8 emacs
and nothing changed in the display.
I also tried (and failed) to guess the encoding : it must be an encoding in which "é" is the 216th character. Now é is U+00E9 in Unicode, which gives 233 in decimal. Also é is number 130 in extended ASCII.
character-encoding
character-encoding
asked 2 hours ago
Ewan Delanoy
1124
1124
That 216 is in octal => 142 decimal (but I have no clue which encoding it's using). It's not cp863 either.
– rpluim
2 hours ago
add a comment |Â
That 216 is in octal => 142 decimal (but I have no clue which encoding it's using). It's not cp863 either.
– rpluim
2 hours ago
That 216 is in octal => 142 decimal (but I have no clue which encoding it's using). It's not cp863 either.
– rpluim
2 hours ago
That 216 is in octal => 142 decimal (but I have no clue which encoding it's using). It's not cp863 either.
– rpluim
2 hours ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
This is the MacRoman encoding, a legacy encoding from the pre-OSX days of Mac OS. It is available in Emacs as mac-roman
.
C-x RET r mac-roman RET yes RET
You may need to select mac-roman-mac
, mac-roman-dos
or mac-roman-unix
explicitly if Emacs doesn't automatically detect the representation of line endings. The mac-roman
part is for the encoding of non-ASCII characters.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
This is the MacRoman encoding, a legacy encoding from the pre-OSX days of Mac OS. It is available in Emacs as mac-roman
.
C-x RET r mac-roman RET yes RET
You may need to select mac-roman-mac
, mac-roman-dos
or mac-roman-unix
explicitly if Emacs doesn't automatically detect the representation of line endings. The mac-roman
part is for the encoding of non-ASCII characters.
add a comment |Â
up vote
3
down vote
accepted
This is the MacRoman encoding, a legacy encoding from the pre-OSX days of Mac OS. It is available in Emacs as mac-roman
.
C-x RET r mac-roman RET yes RET
You may need to select mac-roman-mac
, mac-roman-dos
or mac-roman-unix
explicitly if Emacs doesn't automatically detect the representation of line endings. The mac-roman
part is for the encoding of non-ASCII characters.
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
This is the MacRoman encoding, a legacy encoding from the pre-OSX days of Mac OS. It is available in Emacs as mac-roman
.
C-x RET r mac-roman RET yes RET
You may need to select mac-roman-mac
, mac-roman-dos
or mac-roman-unix
explicitly if Emacs doesn't automatically detect the representation of line endings. The mac-roman
part is for the encoding of non-ASCII characters.
This is the MacRoman encoding, a legacy encoding from the pre-OSX days of Mac OS. It is available in Emacs as mac-roman
.
C-x RET r mac-roman RET yes RET
You may need to select mac-roman-mac
, mac-roman-dos
or mac-roman-unix
explicitly if Emacs doesn't automatically detect the representation of line endings. The mac-roman
part is for the encoding of non-ASCII characters.
answered 1 hour ago


Gilles♦
12.5k43274
12.5k43274
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f45129%2fencoding-issue-for-french-text%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
That 216 is in octal => 142 decimal (but I have no clue which encoding it's using). It's not cp863 either.
– rpluim
2 hours ago