Questions tagged [character-encoding]
Character encoding refers to the way characters are represented as a series of bytes
117
questions
1
vote
2answers
45 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 ...
1
vote
0answers
33 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 ...
0
votes
1answer
37 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 ...
3
votes
1answer
117 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
124 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
37 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/...
0
votes
1answer
104 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 ...
1
vote
1answer
25 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
1answer
43 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 ...
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 ...
0
votes
0answers
28 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\...
0
votes
0answers
18 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
30 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
0answers
37 views
Coding system issue
I am struggling with Emacs coding system for years, sometimes it does what I expect it to do, sometimes not? I am mostly writing in French, often in English also and starting a bit in Spanish. I ...
3
votes
2answers
435 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
135 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
59 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
96 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 ^...
2
votes
0answers
43 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[\]^_`...
1
vote
0answers
151 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
167 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
1answer
162 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
53 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
170 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 ...
4
votes
2answers
513 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
233 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
96 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
84 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 ...
1
vote
1answer
424 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
242 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
278 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
873 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
173 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
434 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
214 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
178 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
636 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
113 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
225 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
326 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
542 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
292 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
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 ...
4
votes
1answer
331 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
117 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
153 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
228 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 \...