People who code: we want your input. Take the Survey

Questions tagged [unicode]

Unicode is a standard for the encoding, representation and handling of text with the intention of supporting all the characters required for written text incorporating all writing systems, technical symbols and punctuation.

Filter by
Sorted by
Tagged with
25
votes
4answers
4k views

Line height with unicode characters

Some Unicode characters cause the line they are displayed on to be quite large. For example, a grave accent "̀ " adds about 2.5 lines of space above and below it. Other characters that cause this ...
20
votes
2answers
2k views

How do I set up font fallback in a robust way?

TL;DR: What's a simple way to reliably say: use Consolas as the default font, FreeMono for the characters unsupported by Consolas, and Symbola for characters unsupported by both? Since my main ...
17
votes
3answers
4k views

Exporting unicode characters to pdf using latex from org mode

Hello Good people of Emacs! I'm having trouble exporting unicode math symbols from buffer (org-mode) to pdf file. 1. Problem Description: Symbols are inserted to the buffer as unicode characters (...
16
votes
3answers
7k views

Tell a dash (-), an en-dash (–) and an emdash (—) apart

A dash (-), an en-dash (–) and an emdash (—) are different but difficult to tell apart. This causes problems e.g. when writing programs. Is there some way to tell them apart easier in emacs? Thanks.
16
votes
1answer
1k views

How can I draw in unicode with artist-mode?

I'd like to produce unicode art with artist-mode. But it appears that artist-mode only supports ASCII art. How can I configure artist-mode to produce instead of +---------------+ | ...
13
votes
4answers
486 views

Fuzzy completion when inserting Unicode characters

I just discovered C-x 8 RET as a way to insert Unicode characters by Unicode name or hex code. I have not (yet?) memorised all Unicode character names, so I don't always find the right character. ...
12
votes
3answers
8k views

How to display Unicode UTF-8 as Unicode?

I have some UTF-8-encoded text files which display strange escape codes in Emacs. For instance, this text: In ista quaestione primo exponam quid intelligendum est per hoc nomen ‘Deus’; secundo, ...
12
votes
5answers
497 views

Ways to unobtrusively vary text rendering?

I'm writing an emacs extension for use with speech recognition, and I'm looking for help with a particular feature. Some words the speech recognizer (Dragon) recognizes consistently poorly -- it doesn'...
11
votes
1answer
1k views

unicode.txt slowness

Moving around point (using the cursor keys) in Xah’s unicode.txt in fundamental-mode is noticeably slower than in an ordinary text file. Are the many non-ASCII characters the issue? Anything else? ...
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-...
8
votes
3answers
1k views

Fast unicode symbol insertion?

Currently, I'm inserting unicode characters (mainly math symbols) using TeX input method. This is cumbersome, since, for each character, I have to do following: Switch to TeX input method pressing C-...
8
votes
1answer
1k views

Force a single font for all unicode glyphs

I'm using GNU Emacs 24.4.1 in a GUI on OS X. I want to force every character to be displayed using just a single font rather than allowing Emacs to choose a supposedly most appropriate. I understand ...
7
votes
3answers
611 views

Translate ae to ä on non-German keyboard

If for some reason I am stuck to a keyboard with English layout and I often have to enter text in German - can emacs translate ae to ä (or ue to ü) for me? I do have a not-working solution like this: ...
7
votes
1answer
1k views

Insert character by its Unicode name

From the documentation of insert-char, I cannot see why (insert-char "GREEK SMALL LETTER EPSILON") doesn't work. Is there a non-interactive way to insert a character given its Unicode name?
7
votes
2answers
700 views

Idiomatic way of extending keymap for inserting unicode symbols?

I often find myself needing to insert Unicode characters that have no default binding in iso-transl-ctl-x-8-map, i.e., characters that can't be inserted using C-x 8 followed by one or more letters/...
7
votes
1answer
2k views

How do you enter unicode characters in Spacemacs?

I am currently using the normal Evil keybindings (defaults). How do I enter unicode characters such as U+21d2 ⇒ ? In routine applications such as Gedit or Firefox, we can use Ctrl+Shift+U 2 1 d 2 or ...
7
votes
1answer
322 views

Combining diacritics not combining visually

The first two characters in the left buffer are LATIN SMALL LETTER A and COMBINING CIRCUMFLEX ACCENT. Together they should display as â, just like LATIN SMALL LETTER A WITH CIRCUMFLEX, â. However, ...
7
votes
1answer
203 views

char-fold-search match for German eszett (ß)?

In emacs 25.1, if I customize search-default-mode to "Char-Fold Search", then an isearch-forward for u matches ü and one for o matches ö. But what character should I type to match ß ?
7
votes
1answer
1k views

How can I save UTF-8 files with a Byte Order Mark?

I am trying to configure Emacs to save UTF-8 files with a Byte Order Mark. (Yes, I know that the BOM is evil and unnecessary for UTF-8 files. However, Microsoft has decided they know better, so I want ...
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-...
6
votes
1answer
50 views

How do I customize the way Emacs prints out certain keys and key sequences?

For example, I want Control key to be displayed not as C but as ⎈ (U+2388 HELM SYMBOL) in the minibuffer. Trying to personalize my Emacs and display all function keys as ISO symbols. And sequences to ...
6
votes
1answer
398 views

Inserting unicode symbol for rational numbers ℚ using TeX input method

Hello good people of Emacs! To insert unicode math symbols I use TeX input method. This way I get unicode character ℝ by typing \Bbb{R}, ℕ by typing \Bbb{N}, ℤ by typing \Bbb{Z}, etc... I'm unable ...
6
votes
1answer
425 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?
5
votes
2answers
121 views

(ucs-names) in Emacs 26 is not working for “EURO SIGN”

I have in my .emacs: (when (>= emacs-major-version 23) (define-key global-map "\C-x8g" (lambda nil (interactive) (ucs-insert `,(cdr (assoc-string "HRYVNIA SIGN" (ucs-names) t))))) (define-key ...
5
votes
1answer
1k views

Easiest way to render an overline in org mode?

Org mode has support for showing unicode in place of latex commands through org-pretty-entities. Org mode also has support for underlining through font locks that are activated through the _ character....
5
votes
2answers
385 views

Emacs detect terminal Unicode coverage

I diminish my minor modes into single Unicode characters to save space. However, this obviously breaks down in a Linux TTY for instance. How can I detect if the current display method supports Unicode ...
5
votes
0answers
85 views

How to replace a character display only for the `italic` face?

I am using a font that does not include italic characters. However, it does include characters like mathematical italic small a, which I would like to use instead. I can set up a display-table that ...
4
votes
2answers
519 views

Inserting the plus minus unicode symbol ± as a keyboard macro

I insert the plus minus symbol ± frequently enough that I want to bind it to a key. From emacs -Q, I've tried this: (global-set-key (kbd "C-c m") "±") However, when I enter C-c m, the minibuffer ...
4
votes
2answers
735 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 ...
4
votes
1answer
291 views

How can I add Unicode 8 support to Emacs 24.3?

insert-char provides a very convenient way to enter Unicode code points using their names and even search for code point names. Unfortunately, GNU Emacs 24.3 and Unicode 8 were released at roughly ...
4
votes
2answers
551 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. #...
4
votes
1answer
82 views

Compose characters

I have some copied text from a pdf which renders like this with my current font: I know I could use a different font that handles Unicode characters better, but I would rather find a function to ...
4
votes
1answer
73 views

Regexp by Unicode General Category

I'm trying to implement a tokenizer for Haskell, it has a bit involved token structure that can be seen in code here: https://github.com/ghc/ghc/blob/master/compiler/basicTypes/Lexeme.hs In regexp-...
4
votes
0answers
125 views

(set-charset-priority 'unicode) ; should I do it?

I've seen the following in some init files, (set-charset-priority 'unicode) but after reading the documentation, I can't really say I understand the implications of this. In general I'm inclined to ...
4
votes
1answer
622 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 ...
4
votes
1answer
97 views

Getting Emacs to recognize analogous Unicode characters as equivalent when searching

In most contexts, like Firefox of MS Office, if I have text that says, "It’s my birthday" (where the apostrophe has Unicode decimal code 8217) and I search for "It's my birthday" (with a simple ...
3
votes
2answers
967 views

Howto display unicode character \u2026 in terminal mode in emacs

Magit uses Horizontal Ellipsis unicode escape "\u2026" (which should display as "...") to mark hidden section. How can I configure the Terminal/Emacs to display them when running in terminal mode (...
3
votes
2answers
536 views

Is there a way to get a Unicode character by name?

Is there a way to get a character by name (e.g. GREEK SMALL LETTER LAMBDA) instead of by code point (\uX3BB)?
3
votes
1answer
145 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 ...
3
votes
3answers
634 views

Greek (Unicode) in Org mode export to PDF

I am working on a project that deals with polytonic Greek, and wish to write everything in Org mode, and export to a PDF with one of the compilers (like XeLaTeX). I have spent hours today reading ...
3
votes
1answer
614 views

Unicode issues in Org-mode

Lately my documents dissolve into misinterpreted Unicode, for example α becomes \316\261. What could be the cause for that?
2
votes
1answer
870 views

Surprising glyphs for some characters

I am experiencing font issues for a few specific characters, namely the "SYMBOL FOR …" family, which are textual representations of control characters such as NUL, BEL, BS, etc. This screenshot shows:...
2
votes
2answers
193 views

Override the default font for emoji characters

My fonts setup is (setq default-frame-alist '((font . "DejaVu Sans Mono-10"))) (defun my-emoji-fonts () (set-fontset-font t 'symbol "Twemoji") (set-fontset-font t 'symbol &...
2
votes
2answers
249 views

What is the equivalent code of a Unicode character

For example I know that 2018 is the hexadecimal equivalent of left single quotation mark, and I have the following questions: 1: Is there a way to input the Unicode name to Emacs and get the ...
2
votes
1answer
82 views

Abbreviation expansion without spaces

I would like to set up things so that when I type Iuulius, the sequence uu is seamlessly replaced by ū (and a few more such pairs), as soon as I type the second u. I.e. the keystrokes and buffer text ...
2
votes
1answer
42 views

Display LaTeX-Quotation marks as unicode characters

When quoting in auctex, I use the strings "` and "' to typeset „ and “, respectively. Now, I want emacs to display the corresponding unicode characters to these strings. I've tried it with ...
2
votes
2answers
180 views

Can Emacs render family emojis? (Emoji ZWJ Sequences)

For example (explained on Emojipedia): 👨‍👩‍👧‍👦
2
votes
1answer
1k views

Unicode character display

Here's how some of the double-struck unicode letters display in my copy of Emacs for Windows: Here's how they display in Notepad: Version of Emacs: What's a good way to get Emacs to display all of ...
2
votes
2answers
298 views

Programmatically check whether a unicode character will render as tofu

Is there a way to programmatically determine whether a given unicode character will render as tofu in some context in Emacs? Some bug-flavored (U+1F41B) tofu renders in a face using DejaVu Sans Mono:
2
votes
1answer
272 views

Jump to and highlight characters matching regex

How can I jump to the next character matching a regex (see example below)? And if possible, enable highlighting of all the matching characters in the buffer when I jump for the first time. [^\x20-\...