We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [character-encoding]

Character encoding refers to the way characters are represented as a series of bytes

Filter by
Sorted by
Tagged with
0
votes
1answer
137 views

How open text file by default with UTF-8 endcoding system?

Emacs 26.1, Windows 10 In my init.el: (set-language-environment "UTF-8") But when I open text file the Emacs not show correct Cyrillic text. Why? describe-variable -> buffer-file-coding-system ...
0
votes
0answers
13 views

select coding system if annotating with pdftools

so here I am happily annotating pdfs with pdftools and every now and then, the modeline pops up, urging me to select the coding system (default raw text). I already set in my init file (setq utf-...
0
votes
0answers
8 views

Missing Code Page

I need a code translation page for a file containing Russian Cyrillic characters in an unknown format, not alternativnyj, not cyrillic-iso-8bit, not cyrillic-koi8, not ruscii. Cyrillic-iso-8bit comes ...
0
votes
2answers
74 views

Painfully slow encoding popup with “temp file” when creating new file

Around half the time (and I haven't established a solid repro that triggers it), opening a new file in emacs will trigger a big pause, then two windows appear: one showing *temp file* and one asking ...
2
votes
0answers
34 views

How to make emacs not crash when converting binary file to UTF-8

When I run revert-buffer-with-coding-system [RET] UTF-8 Emacs crashes. This is the file I'm trying to revert. \0 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`...
0
votes
1answer
34 views

Characters replaced with angled bracket sequence, possibly due to encoding

I have files in Markdown, saved in a Dropbox folder. One of them replaces characters with angled bracket sequences. For example a git diff no-index between the saved file and a copy-paste of the text ...
7
votes
3answers
5k views

How convert txt file to UTF-8 from Windows-1251?

Windows 10, Emacs 25. When I want to convert file from Windows-1251 to UTF-8 I use Notepad++. Before convert: convert: after convert: My question is: Is it possible this convert in Emacs?
4
votes
1answer
453 views

Under Windows, Emacs cannot handle encodings correctly for subprocesses, can it?

I have two simple text files on my D: drive, as shown below. D:\我.txt I D:\你.txt You After I execute M-x diff and type the correct filenames (Yes, I can input Chinese and filename ...
9
votes
1answer
1k views

Coding System utf-8 on Mac - Which one and why as default?

I want to change my default encoding system from non defined to UTF-8 (I think that would be useful). Now I have seen many different UTF-8 coding systems: mule-utf-8 mule-utf-8-dos mule-utf-8-...
8
votes
3answers
1k views

Using UTF8 encoding as default when writing emails

When I want to send an email I composed in Emacs, I press C-c C-c and am always presented with such an error message: These default coding systems were tried to encode text in the buffer `2015-02-...
8
votes
3answers
4k views

Set default coding system = UTF-8

Windows 10 (64 bit), Emacs 25.1 I want when I save any file to save them (by default) with coding system = UTF-8. So In my init.el I has : (prefer-coding-system 'utf-8) (set-default-coding-systems '...
0
votes
2answers
266 views

Problem with character encoding in Emacs 25

I am running Emacs 25 on Ubuntu 18.04. When I type accents, they display properly, but when I close and then reopen the file they appear like a backslash and then an octal number. This only happens ...
0
votes
1answer
53 views

My terminal emacs displays weird characters (\u2506) for unvisiable characters in buffers

I'm currently in a new environemnt, my emacs in terminal displays weird character in files, GUI Emacs works fine. I don't know how to express this, please see the following details: Text edition: #...
0
votes
0answers
43 views

org-babel results with accented characters

I have a problem with the output of org-babel code blocks when this output contains accented characters. For example, if I execute this code block: #+name: test_accented #+begin_src python :results ...
1
vote
0answers
59 views

Copy or paste between terminal emacs 26 and Mac apps

I am using terminal emacs a lot, and the method from Copy text from Emacs to OS X clipboard works for a long time. But after upgrading to Emacs 26, if I kill a string like "你好" from emacs, and paste ...
1
vote
0answers
96 views

Org-mode ellipsis arrow is not using my defined encoding (utf-8)

First, some info on my system/version: Windows 10 Emacs 26.1 (I'm new to Emacs, so let me know if there is more information I should provide) This is what is happening: The image above shows that ...
2
votes
1answer
63 views

How to have a buffer interpret C-m as an actual carriage return

I'm using the following elisp snippet in a dedicated buffer to track progress of a wget download. (with-current-buffer buf (setq proc (apply 'start-process "my-download" buf (list "wget" (...
1
vote
1answer
77 views

detect unprintable glyph (aka “no font available”) programmatically

Sometimes a font or a font at a special fontsize does not support a unicode glyph. Then a placeholder (box with character number) is printed, see screenshot with selected line: How can I ...
2
votes
1answer
102 views

How to delete ^M in the diffs of Magit?

I had an issue with a file that had inconsistent line ending. My file would show a ^M for every line ending. I ran into this article that shows how to get rid of the ^M character and set the buffer ...
3
votes
2answers
287 views

Pasting Text from Clipboard - why ^M instead of linebreaks?

I'm using some VBA scripts which copy Text in MS Outlook from an e-mail message and send it to the clipboard. If I then paste the clipboard content with Ctrl-Y in Emacs 24.5.1 in Windows 7, the ...
1
vote
0answers
44 views

R in ESS outputs UTF-8, which emacs renders raw

I find the question but no answer at Emacs ESS R - Message Content Encoding and Display Issue. In buffer *R*, the R process uses UTF-8 encoding for its output. However emacs does not decode that ...
0
votes
1answer
99 views

Emacs not show Cyrillic text (UTF-8)

Emacs 26.1, Windows 10 I open by Notedpad++ text file. Here result: As you can see the encoded is UTF-8. And as result Notepad++ success show Cyrillic. Nice. Now I open same file by Emacs: Why ...
2
votes
2answers
136 views

Opening file with emacsclientw, file name contains non-latin characters

My first post here about Emacs. I've spent days trying to figure out answer before posting here. I'm running Emacs 26.1 on Windows 10. The setup that I'd like to have is running a single instance of ...
1
vote
2answers
123 views

Getting no-conversion (nil) encoding each time when opening a file (which should be in utf-8)

I have a file which is encoded in utf-8. But for some reason, each time I open it in Emacs, I get no-conversion (nil) encoding, and all the non-ascii characters can't display correctly. If I run ...
2
votes
0answers
83 views

fix buffer invalid UTF-8 encoding characters by query/replace

When I copy text from web pages, there are some special characters like ', - etc (not UTF-8 encoding). As you can see in the following screenshot: I checked out some similar questions in this site: [...
1
vote
0answers
72 views

Wrong unicode glyphs in emacs?

I recently came across a python file "*.py" containing several prints consisting of unicode symbols. I noticed that several symbols are displayed with different glyphs in emacs than in another editor. ...
4
votes
1answer
361 views

Encoding issue for French text

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 ...
2
votes
2answers
846 views

How to set default encoding to utf-8, and default line ending to linux style?

I use this piece of code to set the default line ending to linux-style \n ;; https://www.emacswiki.org/emacs/EndOfLineTips (add-hook 'find-file-hook 'find-file-check-line-endings) (defun dos-file-...
2
votes
2answers
122 views

Greek typing & spell-checking with hunspell: encoding issue?

hunspell-checking Greek text I create in Emacs is not working. Notes: I am aware of this post: Spell check with multiple dictionaries Eventually, I want to use ispell with hunspell in Emacs, which ...
5
votes
2answers
1k views

Emacs doesn't let me exit without selecting a coding system

Sometimes to speed up of opening an emacs' eshell directly from terminal (in my case from MS DOS prompt), I do emacs -Q -f eshell. But when I try to exit emacs doesn't let it, unless I give some input ...
1
vote
0answers
128 views

copying into emacs from clipboard garbled

When I copy data from outside to my emacs, it is garbled (venv) tree ./scripts scripts ├── foo.sh ├── bar.sh ├── start.sh ├── stop.py However, when I paste this in emacs, I get this: (venv) tree ....
0
votes
2answers
95 views

Org links file name encoding issue

Inspired by John Kitchin's presentation of org-links features in Org-mode 9, I tried to implement a simple functionality for "file" links. Since I am working on several machines, I wanted the link ...
4
votes
2answers
212 views

How can I find non-displayable unicode characters in a buffer?

I mean these: I'd like to remove them, so I'm looking for a function which can find all these characters in the buffer which cannot be displayed properly with the current font and therefore show up ...
1
vote
0answers
71 views

Emacs ESS R - Message Content Encoding and Display Issue

I use Emacs ESS for doing some work in R. But somehow the help messages or content which is output of R process, is not printed correctly, most likely because of some encoding issue. (Screenshot ...
1
vote
1answer
103 views

Display glyphs instead of codepoints

I have a JSON file where Unicode characters are encoded as UTF-8 codepoints, example: \u05de instead of the Hebrew character Mem (מ). How could I get emacs to display glyphs instead of the codepoint ...
2
votes
1answer
158 views

Strange encodings in ORG mode with German umlaute

I have a few org files encoded in UTF-8. Everything works fine, also with German umlaute (ä, ö, ü, ß). These files I sync with Git between different PCs (mostly running Debian). When I synced one of ...
1
vote
2answers
266 views

How can I view accent characters natively?

In GUI emacs 25.3.1, I have a text file with octal character codes for accents. For example I have many \212 characters which are really Š characters. If I replace-string the occurrences, it shows ...
2
votes
1answer
207 views

Quail Rules UTF8 behaviour

I had inserted the following code in .emacs: (quail-define-package "LaTeX-UTF-8" "TeX" "TeX") (quail-defrule "α" ["\\alpha"]) what I want to do is the following: when I insert the character "α" (I ...
1
vote
1answer
108 views

Org tangle source blocks to a file with byte-order-mark (BOM) from org mode

Because Firefox doesn't load local files with UTF8 characters like '📞, …, 🖥' in the HTML or the CSS correctly, since it does not receive a <meta charset="utf8" /> header, I need to tangle ...
4
votes
0answers
186 views

Shell coding system

If, before M-x shell, I run C-x RET c (universal-coding-system-argument) I can change the coding system used by the shell. Therefore, given echo Straße > foo foo will be encoded in the related ...
12
votes
3answers
6k views

How to display Unicode UTF-8 as Unicode?

I have some UTF-8-encoded text files which display strange escape codes in Emacs. For instance, this text: In ista quaestione primo exponam quid intelligendum est per hoc nomen ‘Deus’; secundo, ...
0
votes
1answer
92 views

File encoding differet when visiting the file again

I have this in my .emacs: (setq-default buffer-file-coding-system 'utf-8-unix) When I create a file in emacs and save it, it should be buffered and saved in utf-8-unix. When I open such a file ...
1
vote
1answer
114 views

Replace certain multibyte characters

In my markdown file (coming from a Windows computer on which I have no control), I have several multi-byte characters. Some text xx Some text yy Some text In emacs, they are displayed as \221 and \...
2
votes
2answers
828 views

How encode to UTF-8 content of buffer?

Windows 10, Emacs 25.1 When I open file that not encoding in UTF-8 I get the next incorrect result: I try by command set-buffe-file-coding-system but it not help. And here result: As you can see ...
0
votes
2answers
502 views

File names encoding when running shell-command on Windows XP

I faced a problem when pdflatex launched from Emacs couldn't compile files whose name contained Russian characters. The same code worked on Linux, so I suspected that something is wrong with encoding ...
1
vote
1answer
79 views

Display devanagari characters

Running Emacs 25 on Kubuntu 17.10. I am able to enter text in devanagari script but it does not dispaly correctly in the editor. For instance, the text entered as: क का कि की कु कू के कै को कौ कं कः...
6
votes
1answer
999 views

How can I save UTF-8 files with a Byte Order Mark?

I am trying to configure Emacs to save UTF-8 files with a Byte Order Mark. (Yes, I know that the BOM is evil and unnecessary for UTF-8 files. However, Microsoft has decided they know better, so I want ...
2
votes
3answers
1k views

How to get rid of BOM (byte order mark)

How can I open a file with a BOM Byte Order Mark and ensure that BOM is gone when I save the file.
3
votes
1answer
89 views

Encoding in buffers not associated with files

I use Magit to manage Git repositories. Some of these repositories have collaborators whose names contain accented characters. In a freshly-started Emacs, everything looks fine. In a long-running ...
2
votes
1answer
234 views

How to query/set the character encoding?

How can I find out what character encoding Emacs employs in saving a text file to disk? And how can I specify this encoding? Operating system: macOS Sierra, Version 10.12.5 Emacs: GNU Emacs 25.1.1