Questions tagged [character-encoding]

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

Filter by
Sorted by
Tagged with
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 ...
6
votes
1answer
208 views

How do I find out which input modes include a specified uft-8 character?

Using the input mode latin-1-prefix I can enter "~a" which gives me "ã". I am looking for a similar way to enter the characters "āēīōū" (vocals with bars). So my question is: What input mode does ...
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 ...
1
vote
2answers
466 views

Can serial-term interpret new line characters as CR LF?

I'd like to read a serial link from Emacs using serial-term. The output looks wrong, like if the new line characters did not trigger carriage return: First line Second line ...
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: "(...
0
votes
1answer
472 views

UnicodeEncodeError in inferior python under windows

I have recently started using emacs under Windows as my python IDE. I had some struggle getting python convinced that it was allowed to output UTF-8 to my terminal emulator (mintty does support ...
9
votes
3answers
1k views

Package manager encoding error

Upon running package-list-packages, I get the following error. These default coding systems were tried to encode text in the buffer ` *temp*': (iso-latin-1-dos (3242 . 37326) (3243 . 40165)) ...
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"))) ...
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 ...
5
votes
2answers
538 views

Org-mode timestamps encoding

I love org-mode. It's main reason why i switched from vim. It's really interesting to write reports using Literate Programming. I try to use TODO, agenda etc. to be more productive. I was able to ...
1
vote
1answer
85 views

How to fix latin character (e.g. ç, é) incorrectly displayed in emacs ess-buffer?

When I read a file into R, and the file contain characters like "ç" or "é" (latin characters) in a string, the ess-buffer shows meaninless (to me) numbers. For example, the string "ações" is ...
5
votes
0answers
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 ...
3
votes
1answer
199 views

How can I always open a file with a certain coding system?

I'm trying to open the edict2.gz file from http://www.edrdg.org/jmdict/edict_doc.html which is a japanese->english dictionary so first I changed the extension to .txt. Currently there are many ...
4
votes
1answer
159 views

Invalid coding system: auto-save-coding when trying to recover auto-save files

Sometimes when I try to run recover-this-file I get an error Invalid coding system: auto-save-coding which prevents the file from being recovered. I had to manually find the autosave file and copy ...
4
votes
2answers
277 views

Advice on setting shell's character set

M-x shell has been my friend for decades, and I've always been comfortable even sympathetic with his insistence on being a dumb terminal (i.e. TERM=dumb). But recently I've found my self setting ...
6
votes
1answer
258 views

Check if terminal supports Unicode

I would like to use special mark symbols not only in window-system but also in xterm: (setq gnus-summary-to-prefix (if window-system "▒ " "==> ")) What check I should use?
4
votes
0answers
618 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, ...
6
votes
1answer
1k views

Emacs is asking me for a coding system on each save

I consolidated many text files (win, mac, unix) into a single orgmode file. For some characters I was seeing numbers instead of the right characters. Things like \314\203. I used "revert-buffer-with-...
1
vote
1answer
75 views

Emacs doesn't show cyryllic properly over SSH

I'm using SSH to connect to remote server. On the server, I'm running emacs (emacsclient -c). It servers as my console, text editor and WM. While everything works nice when I'm not dealing with ...
3
votes
1answer
1k views

Open Russian file names on windows?

In emacs on Windows 8.1 I can't open a file if its full name contains Russian letters [and generally any non-ascii char]. For example, if I try to open D:\ББББ\test.txt I get: I find a config which ...
0
votes
1answer
401 views

Why are some Chinese characters not displayed using the specified font?

I specified the font using: (set-face-attribute 'default nil :font "Inziu Iosevka SC") The expected result is (in notepad.exe): But the result in Emacs is actually: Only 举, 头 and 乡 are displayed ...
1
vote
1answer
1k views

How to convert a MULE encoded file to UTF-8?

I am trying to modify a buffer written by desktop-save to a file. The file is named .emacs.desktop and I am trying to modify it from a Perl script. It turns out that it is saved in emacs-mule encoding....
1
vote
0answers
211 views

Hunspell: encoding of personal dictionary

I am using hunspell 1.3.2 (on Windows) for spell checking, and I've been trying to make a personal dictionary. It works just fine, except the encoding is garbled. Whether I encode the personal ...
1
vote
0answers
168 views

Why does emacs insert a `#coding` header into my file?

I have a file where every time I save the file emacs inserts a # coding: utf-8 at the top of the file. I'm using the prelude package. How do I turn this off? I'm having a hard time tracing where this ...
1
vote
2answers
675 views

How to convert Unicode backslash octal representation to the character it represents?

If I paste a string from some web page into an Emacs buffer sometimes it will show the Unicode representation of some characters with a backslash and some octal code. How can I convert this to the ...
1
vote
0answers
740 views

How do I edit text in Cyrillic / Russian on OpenBSD?

I'm trying to make it possible to easily edit text in Cyrillic / Russian on a remote OpenBSD 5.2 amd64. I'm using emacs-21.4p18-no_x11, which doesn't show any Cyrillic characters whatsoever when I ...
2
votes
1answer
114 views

How to get UTF-8 displayed properly in Emacs menus?

I use GNU Emacs 23.4.1 that comes with Debian Wheezy and UTF-8 as system character encoding. When I add bookmark it displays properly in minibuffer and in the buffer, however the bookmark name is ...
6
votes
2answers
2k views

How to insert invalid UTF-8 sequence

In order to test that some code handles an invalid UTF-8 sequence properly, I need to insert an invalid UTF-8 sequence into an existing text file. However, my attempts to do so result in a valid UTF-...
5
votes
1answer
498 views

UnicodeDecodeError in my Inferior Python buffer

While trying to run a python script in an Inferior Python buffer for Python 3.3.5 in my Emacs 24.3.1 GTK+ window, I get a >>> Traceback (most recent call last): File "<stdin>", line ...
2
votes
1answer
204 views

Unicode and `url-unhex-string` and something like \345\205\266\344\273\226

I need to use Emacs built-in url.el url-unhex-string to decode uri (e.g. /%E5%85%B6%E4%BB%96/other) It works, but all non-ascii (I guess it should be Unicode) characters are all converted into ...
4
votes
1answer
511 views

How to set the coding system for new files with specific extensions

When I visit a new file, ^xf, that has an extension of .sql or .dsql I would like the coding system to be set to utf-8-with-signature-dos. The default is currently iso-latin-1-dos. I'm running (...
2
votes
1answer
410 views

How to transfer special characters like äöü in the command line to emacsclient?

I try to create an interaction between Emacs and other applications, e. g. Microsoft Office. For example I have defined a VBA Macro in MS Outlook which starts a search in Emacs: strEmacsclientPath = ...
0
votes
1answer
86 views

How to run iso-tex2iso in batch mode?

Main question: In order spell checkers can apply, M-x iso-tex2iso is nice for converting TeX-encoded files to e.g. UTF-8 encoded ones. But, in case a numerous files to convert, running this command in ...
2
votes
0answers
108 views

What coding system should I use for one Emacs configurations for both unix and Windows?

I set the coding as utf-8, and I got many ^M from eshell on Windows. There's utf-8-dos and utf-8-unix. I would like to use the same configuration file on both unix and Windows. I guess there are many ...
5
votes
2answers
2k views

How to strip invalid UTF-8 characters from a string?

TL;DR: I have a string with characters that are unencodable in UTF-8, and I need to remove these characters before writing the string to a file. For instance, the following snippet creates a file ...
3
votes
1answer
759 views

Unicode characters with same font produce different results in GUI and terminal

While I'm able to display the cute little snowman ☃ in both GUI and terminal I'm not able to display these unicode characters in the terminal although it works in the GUI : Ⓐ Ⓑ ... I've got the usual ...
9
votes
2answers
558 views

How to change octal sequences into utf-8 text

When I copy non-ascii text from Windows and paste into Emacs, it shows up as an octal sequence. For example, if I paste ä into Emacs it shows up as \344. I could type C-q 344 to get the ä back in ...
9
votes
1answer
526 views

How to get human language-specific numerals?

TL;DR: how can I use Hindi digits (١٢٣...) when writing in Arabic? Emacs is arguably hailed as the best editor, but when it comes to using numerals in the context of writing there are no satisfactory ...
14
votes
4answers
6k views

How to input special character, such as Celsius symbol, and common greek letters?

I want to input: Celsius degree symbol Common Greek letter: Alpha, Theta, Omega
6
votes
1answer
312 views

Why must I set and reset `buffer-multibyte` to correctly view multibyte buffers?

In an ongoing project, we are inserting multibyte text into a buffer and experiencing strange behavior. When the question is first viewed, we receive something like: Quote Environment à la Strunk\...
2
votes
1answer
750 views

What does `mac` in `utf8-mac` mean?

In Emacs, I show the newline convention used by emacs for the current file, by M-x describe-variable, then buffer-file-coding-system. The result is utf8-mac. Does mac, dos, unix after the hyphen ...
7
votes
3answers
1k views

単 does not show up in Emacs, how to fix?

I'm editing a text file containing Japanese kanji characters. 単 does not show up in Emacs, how to fix? It shows up as some sort of white space. Update: I'm using GNU Emacs 24.3 (9) for Mac. After ...
5
votes
1answer
950 views

Character encoding when copying some text from somewhere to Emacs and saving to a file

Suppose I copy some text from a source (e.g. a webpage, a text file opened in an editor such as gedit or emacs) to a buffer in emacs, and then save the buffer to a text file. When I copy the text ...
5
votes
1answer
354 views

Handling text files with mixed encodings

I created a text file by copying its different parts from different sources (webpages, other text files, pdf files) into gedit and saved it to the file. I wonder if that is the reason why I may have ...