reddit / emacs

Unicode symbol render

AsterOps · 2022-04-06 21:23
I've extracted from [Purcell's](https://github.com/purcell/emacs.d/blob/master/lisp/init-lisp.el) `emacs.d` this very nice welcome message ``` (setq-default initial-scratch-message (concat ";; Happy hacking, " user-login-name " - Emacs ♥ you!\n\n")) ``` Today I've upgraded my emacs to 28.1 and then support for this unicode stop working. I can paste this symbol to buffer but on startup I see this: ``` ;; Happy hacking, <my-username> - Emacs \324\231\245 you! ``` I have in my `init.el` following line (before scratch message): ``` (set-default-coding-systems 'utf-8) ``` but it doesn't help. How to fix it?
lebensterben · 2022-04-06 22:44
https://www.masteringemacs.org/article/whats-new-in-emacs-28-1 read this regarding unicode support
7890yuiop · 2022-04-07 04:01
FWIW, I can't reproduce that with your code in 28.1, with or without `set-default-coding-systems`. It certainly seems as if Emacs doesn't have the expected coding for your buffer, though. Maybe a locale issue? What does this report? (cl-loop for var in process-environment if (string-prefix-p "LC_" var) collect var)
AsterOps · 2022-04-07 08:03
``` ("LC_CTYPE=en_US.UTF-8") ``` Actually I have second laptop with the same OS, emacs version ``` GNU Emacs 28.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-04-06 ``` and from from your command I receive just `nil` but the symbol works correctly
7890yuiop · 2022-04-07 22:24
May as well test that: $ env -u LC_CTYPE emacs
TeMPOraL_PL · 2022-04-08 14:49
See if you don't have an `int.elc` hanging around somewhere - maybe it somehow got byte-compiled before your upgrade, and the string stored within it is now interpreted incorrectly?