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
0answers
38 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 ...
0
votes
1answer
44 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: #...
1
vote
0answers
46 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 ...
0
votes
1answer
31 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 ...
1
vote
1answer
65 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
71 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 ...
1
vote
0answers
78 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
62 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
0answers
41 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
113 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
1answer
89 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
120 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 ...
0
votes
2answers
224 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 ...
2
votes
0answers
65 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
70 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
358 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
116 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 ...
0
votes
2answers
88 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
191 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
66 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
97 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
147 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
238 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
200 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 ...
0
votes
0answers
65 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 ...
4
votes
0answers
182 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 ...
0
votes
1answer
84 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
100 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 ...
1
vote
1answer
107 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
758 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
745 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 ...
1
vote
1answer
77 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: क का कि की कु कू के कै को कौ कं कः...
3
votes
1answer
87 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 ...
6
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?
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
468 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
0answers
119 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 ....
2
votes
1answer
219 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
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.
1
vote
0answers
101 views

Wrong encoding in eshell when closing Emacs

I have a lot of filenames in Russian in my file system. Every time I close Emacs if I had eshell opened, it shows a *temp* buffer with a list of directories. And asks 2 questions: Select coding ...
0
votes
1answer
413 views

UnicodeEncodeError executing python in Emacs - not in Terminal

I have a python file which defines a function and calls it. def remove_whitespace(input_file, output_file): with open(input_file) as f: f.readlines() # do something If I execute ...
0
votes
2answers
466 views

emacs counts German umlaut as two columns

I have been writing a document with a not monospaced font, because it is not code but only text. This is a document written in reStructuredText, with the file ending .rst and when it is opened in ...
1
vote
0answers
386 views

Charset and fonts shown by `describe-char`

I have some questions about emacs internal actions related to charset and fonts shown by describe-char. Now I use utf-8 as character encording scheme (CES) on emacs, so charsets shown by describe-...
5
votes
2answers
212 views

How many bytes are in the region?

After far too many years of counting the number of characters in the region by doing M-: (- (point) (mark)), I just discovered M-= (count-words-region). Much better! But now I'm looking for a way to ...
4
votes
1answer
434 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 ...
0
votes
1answer
348 views

Coding issue with clang-format on Windows

After a recent Emacs update, the clang-format package started to misbehave under Windows. For instance, calling clang-format-buffer on a test.cpp file with the following content returns error: "(...
2
votes
1answer
234 views

^M character suddenly appearing upon opening file [closed]

I'm using Emacs on Windows. Everything was fine just a few minutes ago, but for some odd reason, when I open a certain file, I get ^M characters after every line. As far as I know/remember, I didn't ...
6
votes
2answers
184 views

Key bound to string does not handle some chars in string correctly

(I ask this question after reading this one.) The form (global-set-key (kbd "M-e") "e") is, as far as I can tell, equivalent to (global-set-key (kbd "M-e") (lambda () (interactive) (insert "e"))) ...
0
votes
1answer
44 views

ESS dendrograms: appearance of last branch

In R it is possible to customise the appearance of a dendrogram and set a custom start character for the last branches. According to the documentation: In some environments, using ' will provide ...
3
votes
0answers
161 views

Emacs keeps guessing wrong coding system on a file I edit both in Linux and Windows

I use Emacs on both Linux and Windows to edit the same files (that I keep in Dropbox, which I hope is irrelevant, but who knows). The files are encoded in utf-8 with Unix line endings. Occasionally, I ...