all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to select the default coding system
@ 2014-09-17 14:05 Mikael Djurfeldt
  2014-09-18  2:46 ` Eli Zaretskii
  2014-09-21  1:13 ` Grant Rettke
  0 siblings, 2 replies; 3+ messages in thread
From: Mikael Djurfeldt @ 2014-09-17 14:05 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: Mikael Djurfeldt

Dear all,

I just got a question from a beginner Emacs user how to set the default
coding system.  For some reason, he didn't get utf-8 by default (which he
wanted).  He might have touched some setting which caused this.

Now, I'm myself an experienced Emacs user and once did have a complete
overview of Emacs functionality.  But the multi-lingual envorpnment, coding
systems etc is new to me.

Trying to find the answer to this users question, I realized that the
complexity is too large even for me (elisp programmer) to find an answer in
reasonable time.

I started out browsing options in the GUI, trying to find an option for the
default coding system.  I *did* find some coding system options under
"mule", but nothing which seemed to fit.

In the manual I found a function "prefer-coding-system", which I gather one
could place in .emacs.

Q: What is the natural way to specify the default coding system,
preferrably using the GUI (to facilitate things for this novel user).

Best regards,
Mikael D.


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

* Re: How to select the default coding system
  2014-09-17 14:05 How to select the default coding system Mikael Djurfeldt
@ 2014-09-18  2:46 ` Eli Zaretskii
  2014-09-21  1:13 ` Grant Rettke
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2014-09-18  2:46 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 17 Sep 2014 16:05:04 +0200
> From: Mikael Djurfeldt <mikael@djurfeldt.com>
> Cc: Mikael Djurfeldt <mikael@djurfeldt.com>
> 
> Q: What is the natural way to specify the default coding system,
> preferrably using the GUI (to facilitate things for this novel user).

It's supposed to be automatically set according to the user's locale.

If that user's locale is not UTF-8, then please ask them to provide
the details why they want UTF-8 nonetheless, because it could bite
them down the road.

To answer your question more directly, the command to set up a
certain locale environment is "M-x set-locale-environment".  It
accepts the "pseudo-environment" "utf-8", as well as "normal" locale
names, such as "en_US.8859-1".



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

* Re: How to select the default coding system
  2014-09-17 14:05 How to select the default coding system Mikael Djurfeldt
  2014-09-18  2:46 ` Eli Zaretskii
@ 2014-09-21  1:13 ` Grant Rettke
  1 sibling, 0 replies; 3+ messages in thread
From: Grant Rettke @ 2014-09-21  1:13 UTC (permalink / raw)
  To: mikael; +Cc: Emacs Help

Anywhere

(prefer-coding-system 'utf-8)

In GUI

(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))

On Windows

(set-clipboard-coding-system 'utf-16le-dos)
Grant Rettke
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Wed, Sep 17, 2014 at 9:05 AM, Mikael Djurfeldt <mikael@djurfeldt.com> wrote:
> Dear all,
>
> I just got a question from a beginner Emacs user how to set the default
> coding system.  For some reason, he didn't get utf-8 by default (which he
> wanted).  He might have touched some setting which caused this.
>
> Now, I'm myself an experienced Emacs user and once did have a complete
> overview of Emacs functionality.  But the multi-lingual envorpnment, coding
> systems etc is new to me.
>
> Trying to find the answer to this users question, I realized that the
> complexity is too large even for me (elisp programmer) to find an answer in
> reasonable time.
>
> I started out browsing options in the GUI, trying to find an option for the
> default coding system.  I *did* find some coding system options under
> "mule", but nothing which seemed to fit.
>
> In the manual I found a function "prefer-coding-system", which I gather one
> could place in .emacs.
>
> Q: What is the natural way to specify the default coding system,
> preferrably using the GUI (to facilitate things for this novel user).
>
> Best regards,
> Mikael D.



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

end of thread, other threads:[~2014-09-21  1:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 14:05 How to select the default coding system Mikael Djurfeldt
2014-09-18  2:46 ` Eli Zaretskii
2014-09-21  1:13 ` Grant Rettke

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.