Questions tagged [character-encoding]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
609 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
2k 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-...
0
votes
1answer
17 views

Cannot use `pbpaste` in Emacs to paste Chinese characters

I'm using macOS. I tried using the following command to paste from clipboard in Emacs(started with emacs -Q) (call-process "/usr/bin/pbpaste" nil t nil) It works fine for English characters,...
1
vote
1answer
465 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
53 views

Display Δ in the *Shell Command Output* Buffer

I have a shell command I'm running from Emacs that has a Δ character in its output. How can I configure the *Shell Command Output* buffer to display UTF-8 by default? edit: There could also be ...
2
votes
2answers
145 views

US-Intl layout EU users of Emacs in WSL - how do you input those Alt-Gr characters?

I am a user of the US-International keyboard layout and the German language. Somehow Emacs does not allow me to access those Alt-Gr characters for example the German Eszett "ß" and many ...
6
votes
1answer
2k views

Emacs IPython prompt symbol is garbled

I just installed Fedora 24 with Emacs and IPython. When I launched the IPython shell in Emacs, the prompt symbol, which should be "In [1]", is displayed as "^[[?12l^[[?25h". Is there a way to solve ...
1
vote
2answers
49 views

When reloading an org mode file, why do I get a whole bunch of `^M` chars in my file?

I'm just learning emacs and I'm using spacemacs configuration. I created a .org file and everything looks normal when I save it, but when I reload it I get a whole bunch of ^M chars at the end of each ...
4
votes
1answer
793 views

How do I change permanently the encoding of a text file?

I have a bunch of html files encoded as iso-8859-1-unix and a few encoded in utf-8-unix. What I want is to encode all of them in utf-8-unix. I have already tried (I think they are the same command, ...
1
vote
0answers
35 views

Emacs displays raw text instead of unicode

I'm working on a LaTeX document in emacs (27.1) that contains english as well as sanskrit (devanagari) text. After running aspell on the document, I ran M-x revert-buffer and attempted to save the ...
3
votes
2answers
500 views

Unicode input from keyboard (QMK) to Emacs

I have setup my QMK-enabled keyboard to output Unicode characters. In short, that was adding UNICODE_ENABLE = yes line to the rules.mk file and adding the following two lines to the config.h file. #...
0
votes
1answer
38 views

MAGIT: “precomposed unicode is not supported”

I am trying to commit in my Emacs folde, and I get this message below: "precomposed unicode is not supported". I have run on my Terminal "git config core.precomposeunicode false" ...
1
vote
0answers
39 views

Unwanted characters in messages downloaded with RMAIL

I use RMAIL as my default Email client and it works well for my purposes. I have one small problem with it that I cannot resolve. Downloaded messages include unwanted characters in one heading, the ...
0
votes
1answer
54 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 ...
4
votes
2answers
534 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
1answer
120 views

Make `re-search-forward` return string with Korean characters

I am trying to implement a web scraper that does the following: Make a request to https://m.weather.naver.com/, Get interesting pieces of information (regarding today's weather), then Organize them ...
3
votes
1answer
133 views

How to open a file which looks like unicode in emacs

I have a file in my C: drive on Windows named MSDELog.log and from opening the file with a hex editor I can see that there is a null character after each character. But there is no indicator at the ...
0
votes
0answers
11 views

Presenting part of the buffer in alternative way with editing capabilities and background recoding/validation?

Windows .reg files are almost human readable. Because some types require binary encoding, like: "Name"=hex(2):54,00,65,00,6d,00,70,00,6f,00,72,00,61,00,72,00,79,00,20,00,53,\ 00,65,00,74,...
1
vote
0answers
47 views

Why did I get the U+2019 right single quotation mark not plain ASCII single quote in C mode?

In Emacs under C mode, why did the single quote key give me a U+2019 right single quotation mark, not a plain ASCII single quote? (That was corrected by a bot https://stackoverflow.com/posts/64104679/...
1
vote
2answers
182 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 ...
1
vote
1answer
28 views

Decode double-back-slashes-prefixed octal codes in 'utf-8

I have a string "\\303\\273" that I want to decode into û. It's known that (decode-coding-string "\303\273" 'utf-8) evals to û. However, I'm not able to translate "\\303\\273&...
0
votes
0answers
17 views

Emacs on OSX changes encoding while loading

When I start Emacs on OSX (installed via "brew cask install emacs"), I see the "U" for UTF-8 encoding in the mode line for a fraction of a second, then it changes automatically to ...
4
votes
1answer
352 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
0answers
29 views

`ispell-dictionary-base-alist` and `ispell-dictionary-alist`: how to add utf-8 cyrillic charachter codes?

ispell-dictionary-base-alist contains these values for russian: ("russianw" ; russianw.aff (CP1251 charset) "[\300\301\302\303\304\305\250\306\307\310\311\312\313\314\315\316\317\320\...
1
vote
1answer
171 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
0answers
20 views

What does “Automatic selection from [utf-8-unix utf-8-dos utf-8-mac]” mean in description of utf-8 coding system?

I'd like all new files created by Emacs (28.0.50 prerelease on Win10) to have Unix-style (LF) line endings by default. I've had the following in my .emacs for a long time: (prefer-coding-system 'utf-...
0
votes
0answers
32 views

How to find correct character encoding

I am unable to save a buffer due to a character encoding. I am doing exploratory data analysis using Org babel. Data is read from a file using Python and the results are printed to the buffer. #+...
0
votes
1answer
140 views

Tamil characters show as garbage in shell buffer but ok in files

When printing non-latin characters like the ones from my mother tongue Tamil in shell, it appears weird(left side window in the image). When I open the file with Tamil characters they are rendered ...
0
votes
0answers
60 views

Problem with file encoding in Org-Mode

One org-mode file started showing strange coding instead of spanish characters (á, é, ...). Instead of "Música" and "fotografía" it shows "M\303\272sica" and "fotograf\303\203\302\255a". I'm using ...
1
vote
0answers
106 views

Emacs opens files with wrong line end encoding

Whenever I open a file encoded with dos end lines, Emacs decides it's encoded in undecided_linux and displays ^M after each line. I checked, those files all have matching newline characters (no odd ^...
0
votes
2answers
107 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
44 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[\]^_`...
10
votes
3answers
8k 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
2k 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-...
11
votes
3answers
9k 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 '...
1
vote
2answers
945 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
179 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
165 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
242 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
99 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
173 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 ...
3
votes
2answers
527 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
90 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
253 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 ...
3
votes
2answers
285 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
228 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
180 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
84 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. ...
5
votes
1answer
440 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
2k 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-...