all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to enforce utf8 for all file without an override
@ 2016-06-11 13:42 Tom Browder
  2016-06-11 14:47 ` Emanuel Berg
  2016-06-11 16:00 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Tom Browder @ 2016-06-11 13:42 UTC (permalink / raw)
  To: help-gnu-emacs

I need to make my emacs interpret and display text files of all kinds as
utf8. At the moment I get mixed results depending on the file extension.

How can I make utf8 the default in my init.el file?

Thanks.

Best regards,

-Tom


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

* Re: How to enforce utf8 for all file without an override
  2016-06-11 13:42 How to enforce utf8 for all file without an override Tom Browder
@ 2016-06-11 14:47 ` Emanuel Berg
  2016-06-11 16:28   ` Tom Browder
       [not found]   ` <mailman.1345.1465662580.1216.help-gnu-emacs@gnu.org>
  2016-06-11 16:00 ` Eli Zaretskii
  1 sibling, 2 replies; 7+ messages in thread
From: Emanuel Berg @ 2016-06-11 14:47 UTC (permalink / raw)
  To: help-gnu-emacs

Tom Browder <tom.browder@gmail.com> writes:

> How can I make utf8 the default in my
> init.el file?

Emacs always did this automagically for me, but
this should force a certain encoding for read
and write operations. See the help for
`file-coding-system-alist' to understand how it
works. You might want to try with a test
".txtt" extention if it needs experimentation
to get right. It sure beats littering each file
with instructions how to align the editor!

(setq file-coding-system-alist
      (cons
       '("\\.txt\\'" . utf8)
       file-coding-system-alist) )

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 48 Blogomatic articles -                   




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

* Re: How to enforce utf8 for all file without an override
  2016-06-11 13:42 How to enforce utf8 for all file without an override Tom Browder
  2016-06-11 14:47 ` Emanuel Berg
@ 2016-06-11 16:00 ` Eli Zaretskii
  2016-06-11 17:57   ` Tom Browder
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2016-06-11 16:00 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 11 Jun 2016 08:42:10 -0500
> From: Tom Browder <tom.browder@gmail.com>
> 
> I need to make my emacs interpret and display text files of all kinds as
> utf8. At the moment I get mixed results depending on the file extension.

Please tell the details, it's hard to give you advice without that.



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

* Re: How to enforce utf8 for all file without an override
  2016-06-11 14:47 ` Emanuel Berg
@ 2016-06-11 16:28   ` Tom Browder
       [not found]   ` <mailman.1345.1465662580.1216.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Tom Browder @ 2016-06-11 16:28 UTC (permalink / raw)
  To: help-gnu-emacs

On Sat, Jun 11, 2016 at 9:47 AM, Emanuel Berg <embe8573@student.uu.se> wrote:
> Tom Browder <tom.browder@gmail.com> writes:
>
>> How can I make utf8 the default in my
>> init.el file?
>
> Emacs always did this automagically for me, but
> this should force a certain encoding for read
> and write operations. See the help for
> `file-coding-system-alist' to understand how it
> works. You might want to try with a test
> ".txtt" extention if it needs experimentation
> to get right. It sure beats littering each file
> with instructions how to align the editor!
>
> (setq file-coding-system-alist
>       (cons
>        '("\\.txt\\'" . utf8)
>        file-coding-system-alist) )

Hm, maybe that's part of my problem.  When I use the help describe
function for "file-coding-system-alist" I get in the mini-buffer:

  Describe function: file-coding-system-alist [No match]

Maybe I'm missing some el files.  I'm using Emacs 24.4.1 (from a
Debian 8 package).

Thanks, Emanuel.

-Tom



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

* Re: How to enforce utf8 for all file without an override
       [not found]   ` <mailman.1345.1465662580.1216.help-gnu-emacs@gnu.org>
@ 2016-06-11 16:42     ` Rusi
  2016-06-11 19:24       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Rusi @ 2016-06-11 16:42 UTC (permalink / raw)
  To: help-gnu-emacs

On Saturday, June 11, 2016 at 9:59:42 PM UTC+5:30, Tom Browder wrote:
> On Sat, Jun 11, 2016 at 9:47 AM, Emanuel Berg  wrote:
> > Tom Browder  writes:
> >
> >> How can I make utf8 the default in my
> >> init.el file?
> >
> > Emacs always did this automagically for me, but
> > this should force a certain encoding for read
> > and write operations. See the help for
> > `file-coding-system-alist' to understand how it
> > works. You might want to try with a test
> > ".txtt" extention if it needs experimentation
> > to get right. It sure beats littering each file
> > with instructions how to align the editor!
> >
> > (setq file-coding-system-alist
> >       (cons
> >        '("\\.txt\\'" . utf8)
> >        file-coding-system-alist) )
> 
> Hm, maybe that's part of my problem.  When I use the help describe
> function for "file-coding-system-alist" I get in the mini-buffer:
> 
>   Describe function: file-coding-system-alist [No match]
> 
> Maybe I'm missing some el files.  I'm using Emacs 24.4.1 (from a
> Debian 8 package).

Its a variable not a function -- ie see it with C-h v not C-h f

And the details that Eli is asking for should include:
OS
If *nix then env value of $LANG, etc


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

* Re: How to enforce utf8 for all file without an override
  2016-06-11 16:00 ` Eli Zaretskii
@ 2016-06-11 17:57   ` Tom Browder
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Browder @ 2016-06-11 17:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Sat, Jun 11, 2016 at 11:00 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sat, 11 Jun 2016 08:42:10 -0500
>> From: Tom Browder <tom.browder@gmail.com>
>>
>> I need to make my emacs interpret and display text files of all kinds as
>> utf8. At the moment I get mixed results depending on the file extension.
>
> Please tell the details, it's hard to give you advice without that.

Okay, fair enough, Eli:
...

Great idea, Eli, when I tried to get a detailed description of the
problem I nailed down (I think) that the problem in another diff
editor that seems to be munging the characters.

Sorry for the noise.

Best regards,

-Tom



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

* Re: How to enforce utf8 for all file without an override
  2016-06-11 16:42     ` Rusi
@ 2016-06-11 19:24       ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2016-06-11 19:24 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 11 Jun 2016 09:42:52 -0700 (PDT)
> From: Rusi <rustompmody@gmail.com>
> 
> And the details that Eli is asking for should include:
> OS
> If *nix then env value of $LANG, etc

Most importantly, the details should describe the problems.  Up till
now, we know nothing about the problems that the OP is experiencing,
so it's hard to give any practical advice on how to overcome them.



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

end of thread, other threads:[~2016-06-11 19:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-11 13:42 How to enforce utf8 for all file without an override Tom Browder
2016-06-11 14:47 ` Emanuel Berg
2016-06-11 16:28   ` Tom Browder
     [not found]   ` <mailman.1345.1465662580.1216.help-gnu-emacs@gnu.org>
2016-06-11 16:42     ` Rusi
2016-06-11 19:24       ` Eli Zaretskii
2016-06-11 16:00 ` Eli Zaretskii
2016-06-11 17:57   ` Tom Browder

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.