Skip to main content

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
0 answers
37 views

How to get position-bytes, aligned with file, despite DOS newlines?

I create this test file: test_file.txt: aaaa bbbb aaaa bbbb aaaa bbbb aaaa bbbb aaaa bbbb aaaa bbbb cccc.dddd I put point on the . in cccc.dddd and call (position-bytes (point)). It says 65. But if I ...
Rob N's user avatar
  • 691
0 votes
0 answers
54 views

Error identifying the "coding system" of the custom bullets

I'm trying to setup Emacs from scratch in my Windows system with Emacs. I'm constantly getting below error whenever I try to close the emacs session. I found this related post in reddit, but unlike ...
Gangula's user avatar
  • 313
2 votes
0 answers
26 views

Make Swiper ignore diacritics

Using swiper, I want to search a spanish buffer for the word: "análisis". However, if I type: analisis (no diacritics); swiper says the word is not available. How can I set swiper so that ...
Peter Petigru's user avatar
0 votes
1 answer
34 views

Can't save file that contain German character ß in Emacs?

I'm trying to save a file in Emacs that contain ß. This is name Wißkirchen. When I try to save, got this error: Debugger entered--Lisp error: (file-missing "Loading charset map" "Nie ma ...
jcubic's user avatar
  • 783
0 votes
0 answers
51 views

When I try to quit emacs, I get errors about encoding a "*temp file*"

I'm on Windows 11, and emacs-version reports: GNU Emacs 29.1 (build 2, x86_64-w64-mingw32). When I try to quit emacs, it interrupts and prompts me with these encoding errors. I'll paste an example *...
Rob N's user avatar
  • 691
2 votes
2 answers
104 views

Nordic characters rendered incorrectly in non-file buffers

I am having trouble with nordic characters (å, ä and ö) not rendering correctly in Emacs. In text files, they render correctly, but in dired and other non-file buffers (like counsel-find-file) they ...
najjt's user avatar
  • 43
0 votes
0 answers
25 views

Warn before changing buffer coding system

Imagine I'm currently editing a file with iso-latin1-unix as the coding system. I yank some text from another buffer, not noticing its coding system is utf-8-unix. If the yanked text includes one or ...
JeanPierre's user avatar
  • 7,475
0 votes
1 answer
93 views

Problem with UTF-8 characters in magit buffers

I have my Emacs working in a manjaro (based on arch linux) and the languaage set catalan. It is working well, but I had a problem with dired buffers showing weird symbols and solved adding this ...
anquegi's user avatar
  • 749
1 vote
1 answer
94 views

Tramp resets file buffer encoding to UTF

I edit my files in cp1251 encoding. This works fine on local host but when I save files on remote host using tramp it resets encoding to utf-8 constantly. Even if I do (set-buffer-file-coding-system) ...
George Potapov's user avatar
0 votes
1 answer
49 views

Suddenly, high-value characters in text file display as octal

Using emacs 28.2 (build 2) on MacOS 12.6.5 on 16” M1 2021. About six months ago, I updated emacs. Now all my old files have their higher-value characters spelled-out in octal format. For example: What ...
Demogorgon93's user avatar
0 votes
1 answer
75 views

Coding system issues broke my emacs

I was messing with trying to get emojis to display and I broke my emacs by messing with the coding system settings somehow. After my desktop file failed to load, I uninstalled unicode-fonts and ...
firstname gklsodascb's user avatar
2 votes
1 answer
1k views

How to have utf-8 LF encoding by default on Windows?

I mainly use Linux (arch) but for work, I have to use Windows 10. So I share some files between Emacs (28.2 installed via chocolatey) on Windows and Emacs (28.2) on Linux. I never had any encoding ...
crocefisso's user avatar
  • 1,449
2 votes
1 answer
79 views

Display only the buffer coding systems but not keyboard or terminal coding system in mode line

By default, in terminal, emacs's mode-line-mule-info displays: buffer coding systems keyboard coding systems terminal coding systems EOF indicator Example: -UUU:%%--F1 *GNU Emacs* All L1 (...
Alaneuler's user avatar
  • 277
1 vote
1 answer
268 views

EMACS encoding issues Windows 11

I am having encoding issues with EMACS (ESS). Part of the problem is that many of my file paths contain a special character (ý). These characters keep getting converted to "ý" when I close ...
Jacob's user avatar
  • 21
3 votes
2 answers
279 views

Can Emacs render shell escape codes stored in a GNU Screen session log file?

The GNU Screen utility has the ability to log all shell output to a file, a useful feature to log the output of a long running build system, for instance. The log file generated by GNU Screen ...
PRouleau's user avatar
  • 831
1 vote
0 answers
49 views

How can I install/access 'base64url-encode-string' and 'base64url-encode-region' for emacs 26.1?

My CentOS 8 Stream comes with emacs-26.1 which does not have 'base64url-encode-region'. It seems like this came out in emacs-27.x. I'd like to have the functionality as painlessly as possible. I ...
Erik Bennett's user avatar
2 votes
2 answers
589 views

How do I convert a character code in one coding system (windows-1252) to another?

I'm working on a script that needs to decode some markup in .rtf format. Within rtf, as documented here, the escape sequence \' followed by hex digits specifies a character by numeric code, with the ...
user39125's user avatar
1 vote
2 answers
126 views

Hide ^M in process output buffers?

I have stack traces that are coming either from a process or remote server that have ^M at the end of the lines. I can disable read only mode and remove trailing white space, but it would be nice if I ...
Todd's user avatar
  • 211
1 vote
0 answers
51 views

Why is the encoding for recentfile save file set to utf-8 rather than plain text?

This is from recentf.el in Emacs 26.3: (defconst recentf-save-file-coding-system (if (coding-system-p 'utf-8-emacs) 'utf-8-emacs 'emacs-mule) "Coding system of ...
Mikef's user avatar
  • 195
1 vote
1 answer
42 views

How to solve ansi-term 01F40D character?

Tried this adding these lines to no avail to my init.el (excerpt): (prefer-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-...
jjk's user avatar
  • 748
2 votes
1 answer
96 views

Emacs converts character to raw-byte when inserting

In this example, there is a character bearing number 182 with a string equivalent of ¶. When evaluating the string at issue, the character is displayed correctly in the echo area. When trying to ...
lawlist's user avatar
  • 19.4k
0 votes
0 answers
151 views

Emacs has replaced all special characters with code

Somehow Emacs has replaced all my accented vowels with \303\ and similar codes across all my orgmode files. It's a nightmare. How to fix this? Thanks!
Emmanuel Goldstein's user avatar
0 votes
0 answers
35 views

How to stop image view to ask for coding system

Every time I open any image (png, jpg etc.) I'm confronted with the warning below and `helm` prompting for a coding system. What can I do? These default coding systems were tried to encode text in the ...
jjk's user avatar
  • 748
1 vote
0 answers
111 views

How to set git-gutter's default encoding

Every time I visit a buffer containing characters such as 'ç' 'á' 'ã' or 'é', emacs throws out this error: These default coding systems were tried to encode text in the buffer ‘ *temp file*’: (utf-8-...
Luctins's user avatar
  • 120
0 votes
1 answer
132 views

Only show coding-system in mode-line when not utf-8-unix

I’m trying to save space in my mode-line. 99% of the files I edit are in UTF-8 format with Unix line endings (coding system utf-8-unix). I don’t need the ‘U’/‘U:’ indicator in my mode-line in these ...
Daphne Preston-Kendal's user avatar
1 vote
1 answer
275 views

How to remove characters causing encoding error

When I visit any file under a certain file tree, emacs spits out this error: These default coding systems were tried to encode text in the buffer ‘ *temp file*’: (utf-8 (7862 . 4194279) (14646 . ...
Luctins's user avatar
  • 120
2 votes
1 answer
323 views

How to display file containing old extended-ASCII code-page characters?

How can I setup Emacs to be able to display the content of an old file that contains non-ASCII 8-bit characters that we encoded using a code-page my system does not seem to support? I have a file that ...
PRouleau's user avatar
  • 831
0 votes
1 answer
444 views

Automatically change encoding of process buffers

Platform Windows 10 with GNU Emacs 26.1 (build 1, x86_64-w64-mingw32). Goal To set the encoding of process buffers to UTF-8. I would like to set the input and output encoding of process buffers, like ...
henning no longer feeds AI's user avatar
1 vote
1 answer
82 views

how to stop emacsclient on terminal insert `[I]` when I open a file?

I'm using emacs on MacOS (v11.4 Big Sur) installed from homebrew-emacs-plus and, every time I want to open a file for a quick edit on the terminal (on iTerm2) using emacsclient, a character gets ...
Hugo's user avatar
  • 131
0 votes
1 answer
473 views

How to change encoding of a string (to fix bad encoding)?

I'm really confused about this issue since it should be doable, but i fail to understand it. I have some file with broken encoding (a pdf file, actually), which I copy some text from. When I paste ...
heinwol's user avatar
  • 101
0 votes
1 answer
310 views

Cyrillic and other characters show as numerals enclosed in \ slashes

When I use Cyrillic characters, a pound sign (£), degree sign and others, they appear as figures enclosed by forward slashes when I open the file again. How can I prevent this?
Trofim's user avatar
  • 1
1 vote
0 answers
50 views

Why are eight-bit single-byte characters counted as multibyte with (byte-to-position)?

I was investigating a problem with how an Emacs process (monroe.el) decodes messages formatted in bencode, where the process would not skip over the correct number of characters in the message, ...
Sinuous514's user avatar
1 vote
2 answers
257 views

Select coding system when opening PDF files

I am facing an issue when opening PDF files in Emacs. I always get prompted for "Selecting the encoding system (default raw-text)". The prompt comes up twice. The content of the *Warning* ...
Swarnendu Biswas's user avatar
1 vote
1 answer
335 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,...
Searene's user avatar
  • 519
1 vote
2 answers
148 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 ...
Patrick Ryan's user avatar
2 votes
0 answers
425 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 ...
linuxfan's user avatar
  • 209
1 vote
1 answer
194 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" ...
Emmanuel Goldstein's user avatar
1 vote
0 answers
46 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 ...
Edman's user avatar
  • 1,229
3 votes
1 answer
143 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 ...
Namudon'tdie's user avatar
4 votes
1 answer
492 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 ...
arcomber's user avatar
  • 229
2 votes
0 answers
143 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/...
Tim's user avatar
  • 5,057
3 votes
2 answers
702 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 ...
menuhin's user avatar
  • 335
1 vote
1 answer
94 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&...
Firmin Martin's user avatar
0 votes
1 answer
102 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 ...
Aido's user avatar
  • 185
0 votes
0 answers
248 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. #+...
Lorem Ipsum's user avatar
  • 4,547
4 votes
4 answers
2k 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. #...
TrentinQuarantino's user avatar
0 votes
1 answer
255 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 ...
vanangamudi's user avatar
0 votes
0 answers
627 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 ...
El Diego Efe's user avatar
  • 1,631
1 vote
0 answers
230 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 ^...
em3's user avatar
  • 11
2 votes
0 answers
58 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[\]^_`...
9716278's user avatar
  • 183