all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* When closing an org file, if the file contains Chinese characters, it always prompts me to choose an encoding system.
@ 2024-02-18  5:36 fang yu
  2024-02-24 17:36 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: fang yu @ 2024-02-18  5:36 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

Hi,

I encountered an issue while using org-mode. Whenever the file contains Chinese characters, it always prompts me to choose an encoding system.

My emacs version is 29.2 and my org-mode version is 9.6.15, and  I have language environment setting below 

;; set language environment
(set-language-environment 'UTF-8)
(set-locale-environment "UTF-8”)

Screen snapshot is below:




test.org contins below text:

#+STARTUP: indent

* test

* 测试


Can anyone tell me if there is a way to solve this problem? Thank you in advance.

[-- Attachment #2.1: Type: text/html, Size: 1721 bytes --]

[-- Attachment #2.2: 粘贴的图形-1.png --]
[-- Type: image/png, Size: 261416 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: When closing an org file, if the file contains Chinese characters, it always prompts me to choose an encoding system.
  2024-02-18  5:36 When closing an org file, if the file contains Chinese characters, it always prompts me to choose an encoding system fang yu
@ 2024-02-24 17:36 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-02-24 17:36 UTC (permalink / raw)
  To: fang yu; +Cc: emacs-orgmode

fang yu <smartcarnew@aliyun.com> writes:

> I encountered an issue while using org-mode. Whenever the file contains Chinese characters, it always prompts me to choose an encoding system.
>
> My emacs version is 29.2 and my org-mode version is 9.6.15, and  I have language environment setting below 
>
> ;; set language environment
> (set-language-environment 'UTF-8)
> (set-locale-environment "UTF-8”)
> ...
> Can anyone tell me if there is a way to solve this problem? Thank you in advance.

This is unlikely anything related to Org mode. Something about Emacs
language config.

I personally have
(set-language-environment "English")
(prefer-coding-system 'utf-8)
(add-to-list 'file-coding-system-alist '("\\.org" utf-8))
in my config.
Although, it is copy-pasted from somewhere.

It may help to study the output of M-x describe-language-environment
while inside Org buffer.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-24 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-18  5:36 When closing an org file, if the file contains Chinese characters, it always prompts me to choose an encoding system fang yu
2024-02-24 17:36 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.