all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using utf-8 and only utf-8
@ 2008-08-26  2:38 Maurí­cio
  2008-08-26  6:42 ` Peter Dyballa
  2008-08-26 10:57 ` Nikolaj Schumacher
  0 siblings, 2 replies; 8+ messages in thread
From: Maurí­cio @ 2008-08-26  2:38 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

Is it possible to set something
in .emacs so that emacs will
always, no matter what, save any
file in utf-8 (even those that
were not utf-8 when they were
open)?

Thanks,
Maurício





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

* Re: Using utf-8 and only utf-8
  2008-08-26  2:38 Using utf-8 and only utf-8 Maurí­cio
@ 2008-08-26  6:42 ` Peter Dyballa
  2008-08-26 10:57 ` Nikolaj Schumacher
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2008-08-26  6:42 UTC (permalink / raw)
  To: Maurí­cio; +Cc: help-gnu-emacs


Am 26.08.2008 um 04:38 schrieb Maurí cio:

> Is it possible to set something
> in .emacs so that emacs will
> always, no matter what, save any
> file in utf-8 (even those that
> were not utf-8 when they were
> open)?

For example:

	(prefer-coding-system 'utf-8)

It's more efficient to set in GNU Emacs' runtime environment the  
variable LC_CTYPE to an UTF-8 value. This will make more internals  
work in UTF-8.

--
Greetings

   Pete

Remember: use logout to logout.






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

* Re: Using utf-8 and only utf-8
  2008-08-26  2:38 Using utf-8 and only utf-8 Maurí­cio
  2008-08-26  6:42 ` Peter Dyballa
@ 2008-08-26 10:57 ` Nikolaj Schumacher
  2008-08-27  1:48   ` Maurí­cio
       [not found]   ` <mailman.17642.1219801733.18990.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 8+ messages in thread
From: Nikolaj Schumacher @ 2008-08-26 10:57 UTC (permalink / raw)
  To: Maurí­cio; +Cc: help-gnu-emacs

Maurí­cio <briqueabraque@yahoo.com> wrote:

> Is it possible to set something
> in .emacs so that emacs will
> always, no matter what, save any
> file in utf-8 (even those that
> were not utf-8 when they were
> open)?

Yes, edit `file-coding-system-alist'.  But I'd leave some of the
exceptions (e.g. ".elc") in there.


regards,
Nikolaj Schumacher




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

* Re: Using utf-8 and only utf-8
  2008-08-26 10:57 ` Nikolaj Schumacher
@ 2008-08-27  1:48   ` Maurí­cio
       [not found]   ` <mailman.17642.1219801733.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Maurí­cio @ 2008-08-27  1:48 UTC (permalink / raw)
  To: help-gnu-emacs

Nikolaj Schumacher a écrit :
> Maurí­cio <briqueabraque@yahoo.com> wrote:
> 
>> Is it possible to set something
>> in .emacs so that emacs will
>> always, no matter what, save any
>> file in utf-8 (even those that
>> were not utf-8 when they were
>> open)?
> 
> Yes, edit `file-coding-system-alist'.  But I'd leave some of the
> exceptions (e.g. ".elc") in there.
> 
> 
> regards,
> Nikolaj Schumacher
> 
> 
> 

I just added this to my .emacs:

(prefer-coding-system 'utf-8)
(modify-coding-system-alist 'file ".*" 'utf-8)

Is it the proper way of doing that? (Sorry,
beginner question…)





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

* Re: Using utf-8 and only utf-8
       [not found]   ` <mailman.17642.1219801733.18990.help-gnu-emacs@gnu.org>
@ 2008-09-14 21:12     ` David Combs
  2008-09-15 13:28       ` Determination of character encoding (was: Re: Using utf-8 and only utf-8) ken
                         ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: David Combs @ 2008-09-14 21:12 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]

In article <mailman.17642.1219801733.18990.help-gnu-emacs@gnu.org>,
Maurí­cio  <briqueabraque@yahoo.com> wrote:
>Nikolaj Schumacher a écrit :
>> Maurí­cio <briqueabraque@yahoo.com> wrote:
>> 
>>> Is it possible to set something
>>> in .emacs so that emacs will
>>> always, no matter what, save any
>>> file in utf-8 (even those that
>>> were not utf-8 when they were
>>> open)?
>> 
>> Yes, edit `file-coding-system-alist'.  But I'd leave some of the
>> exceptions (e.g. ".elc") in there.
>> 
>> 
>> regards,
>> Nikolaj Schumacher
>> 
>> 
>> 
>
>I just added this to my .emacs:
>
>(prefer-coding-system 'utf-8)
>(modify-coding-system-alist 'file ".*" 'utf-8)
>
>Is it the proper way of doing that? (Sorry,
>beginner question…)

I get this same question, "what coding system?", sometimes, like
sometimes when grabbing some text from a wikipedia entry.

Not knowing anything about these coding systems, their history,
etc, I haven't a clue as to what to answer!

For someone like me often grabbing ascii[-like?] files from eg
wikipedia, would a choice of utf-8 be reasonable? 

Again, it's for what seems and looks to me (on screen) like 
plain old ascii.

And what would you have me stick into my .emacs, then?


THANK YOU!

David





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

* Determination of character encoding (was: Re: Using utf-8 and only utf-8)
  2008-09-14 21:12     ` David Combs
@ 2008-09-15 13:28       ` ken
  2008-09-15 16:17       ` Using utf-8 and only utf-8 Nikolaj Schumacher
       [not found]       ` <mailman.19278.1221485367.18990.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 8+ messages in thread
From: ken @ 2008-09-15 13:28 UTC (permalink / raw)
  To: David Combs, GNU Emacs List

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 09/14/2008 05:12 PM David Combs wrote:
> In article <mailman.17642.1219801733.18990.help-gnu-emacs@gnu.org>,
> Maurí­cio  <briqueabraque@yahoo.com> wrote:
>> Nikolaj Schumacher a écrit :
>>> Maurí­cio <briqueabraque@yahoo.com> wrote:
>>>
>>>> Is it possible to set something
>>>> in .emacs so that emacs will
>>>> always, no matter what, save any
>>>> file in utf-8 (even those that
>>>> were not utf-8 when they were
>>>> open)?
>>> Yes, edit `file-coding-system-alist'.  But I'd leave some of the
>>> exceptions (e.g. ".elc") in there.
>>>
>>>
>>> regards,
>>> Nikolaj Schumacher
>>>
>>>
>>>
>> I just added this to my .emacs:
>>
>> (prefer-coding-system 'utf-8)
>> (modify-coding-system-alist 'file ".*" 'utf-8)
>>
>> Is it the proper way of doing that? (Sorry,
>> beginner question�)
> 
> I get this same question, "what coding system?", sometimes, like
> sometimes when grabbing some text from a wikipedia entry.
> 
> Not knowing anything about these coding systems, their history,
> etc, I haven't a clue as to what to answer!
> 
> For someone like me often grabbing ascii[-like?] files from eg
> wikipedia, would a choice of utf-8 be reasonable? 
> 
> Again, it's for what seems and looks to me (on screen) like 
> plain old ascii.
> 
> And what would you have me stick into my .emacs, then?
> 
> 
> THANK YOU!
> 
> David

David,

This reply isn't going to answer your question directly, but hopefully
will be helpful, if not to you, then perhaps to someone else reading here.

To determine which character encoding a webpage is, what I do (in
Firefox) is click on "View", then run the mouse pointer down to
highlight "Character Encoding"; this brings up a submenu which will show
a little dot prepended to the character encoding used on that particular
page.  Once in a while, if a more rare encoding is used, I'll have to
push the pointer further, onto "More encodings" and search around the
several submenus there before I find the sought-after prepended dot.



ken

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFIzmL/8CeNiFrQkecRAlQSAJ9grgfBgs+OMxwJqUE7ejy+uMQexwCglZFq
izJehU17ztCpcu8QUjNjHMg=
=6jDC
-----END PGP SIGNATURE-----




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

* Re: Using utf-8 and only utf-8
  2008-09-14 21:12     ` David Combs
  2008-09-15 13:28       ` Determination of character encoding (was: Re: Using utf-8 and only utf-8) ken
@ 2008-09-15 16:17       ` Nikolaj Schumacher
       [not found]       ` <mailman.19278.1221485367.18990.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 8+ messages in thread
From: Nikolaj Schumacher @ 2008-09-15 16:17 UTC (permalink / raw)
  To: David Combs; +Cc: help-gnu-emacs

dkcombs@panix.com (David Combs) wrote:

> I get this same question, "what coding system?", sometimes, like
> sometimes when grabbing some text from a wikipedia entry.
>
> Not knowing anything about these coding systems, their history,
> etc, I haven't a clue as to what to answer!
>
> For someone like me often grabbing ascii[-like?] files from eg
> wikipedia, would a choice of utf-8 be reasonable?

What do you mean by grabbing?  Copy & paste or downloading?

> Again, it's for what seems and looks to me (on screen) like plain old
> ascii.

If it really only contains ASCII characters, it doesn't matter if you
call it ASCII, UTF-8 or something like Latin-1.  They only differ in the
way "other" characters are encoded.  UTF-8 can encode pretty much every
character known to man, and is becoming more and more popular.  It is a
very reasonable choice for storing data.

When it comes to receiving data, you'll have to rely on the sender to
specify the coding system.  Wikipedia uses UTF-8, as you can see in the
HTML header.

> And what would you have me stick into my .emacs, then?

Do you use unix?  Then you only need to specify the correct locale
(e.g. en_US.UTF-8) and Emacs should pick it up.



regards,
Nikolaj Schumacher




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

* Re: Determination of character encoding (was: Re: Using utf-8 and only utf-8)
       [not found]       ` <mailman.19278.1221485367.18990.help-gnu-emacs@gnu.org>
@ 2008-09-22 20:02         ` David Combs
  0 siblings, 0 replies; 8+ messages in thread
From: David Combs @ 2008-09-22 20:02 UTC (permalink / raw)
  To: help-gnu-emacs

In article <mailman.19278.1221485367.18990.help-gnu-emacs@gnu.org>,
ken  <gebser@mousecar.com> wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>
>This reply isn't going to answer your question directly, but hopefully
>will be helpful, if not to you, then perhaps to someone else reading here.
>
>To determine which character encoding a webpage is, what I do (in
>Firefox) is click on "View", then run the mouse pointer down to
>highlight "Character Encoding"; this brings up a submenu which will show
>a little dot prepended to the character encoding used on that particular
>page.  Once in a while, if a more rare encoding is used, I'll have to
>push the pointer further, onto "More encodings" and search around the
>several submenus there before I find the sought-after prepended dot.
>
>
>
>ken
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.0 (GNU/Linux)
>
>iD8DBQFIzmL/8CeNiFrQkecRAlQSAJ9grgfBgs+OMxwJqUE7ejy+uMQexwCglZFq
>izJehU17ztCpcu8QUjNjHMg=
>=6jDC
>-----END PGP SIGNATURE-----
>
>

Cool!


David




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

end of thread, other threads:[~2008-09-22 20:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26  2:38 Using utf-8 and only utf-8 Maurí­cio
2008-08-26  6:42 ` Peter Dyballa
2008-08-26 10:57 ` Nikolaj Schumacher
2008-08-27  1:48   ` Maurí­cio
     [not found]   ` <mailman.17642.1219801733.18990.help-gnu-emacs@gnu.org>
2008-09-14 21:12     ` David Combs
2008-09-15 13:28       ` Determination of character encoding (was: Re: Using utf-8 and only utf-8) ken
2008-09-15 16:17       ` Using utf-8 and only utf-8 Nikolaj Schumacher
     [not found]       ` <mailman.19278.1221485367.18990.help-gnu-emacs@gnu.org>
2008-09-22 20:02         ` Determination of character encoding (was: Re: Using utf-8 and only utf-8) David Combs

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.