[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Convert UTF-8
From: |
Harald Hanche-Olsen |
Subject: |
Re: Convert UTF-8 |
Date: |
Thu, 18 Dec 2008 15:56:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) |
+ YOUNG <breadncup@gmail.com>:
> I could conclude emacs does not have the feature of having BOM in
> utf-8. It only supports utf-8 without BOM.
Not true. But you have to put the BOM (ZERO WIDTH NO-BREAK SPACE,
really) there yourself, since otherwise as you noted (in the elided
text) it can play havoc with shell scripts etc. If you want, e.g., every
file that is visited in text mode to start with a BOM you can add a hook
function to before-save-hook that ensures this before saving.
Also, at least the emacsen I am currently using (version 23 from CVS)
will recognize an initial BOM and automagically pick the utf-8 encoding
when it sees the corresponding three bytes at the top of the file.
> Detailed information about unicode and BOM is found in
> http://unicode.org/faq/utf_bom.html
The use of zero width no-break space as a marker to indicate coding is
also widely regarded as unwise. I am too lazy to find any of the
references that will support my claim, so take it with a grain of salt
if you will.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
- Convert UTF-8, YOUNG, 2008/12/17
- Re: Convert UTF-8, Andreas Politz, 2008/12/16
- Re: Convert UTF-8, Harald Hanche-Olsen, 2008/12/17
- Re: Convert UTF-8, YOUNG, 2008/12/17
- Re: Convert UTF-8, Thierry Volpiatto, 2008/12/17
- Re: Convert UTF-8, Giorgos Keramidas, 2008/12/17
- Re: Convert UTF-8, Xah Lee, 2008/12/17
- Re: Convert UTF-8, YOUNG, 2008/12/18
- Re: Convert UTF-8,
Harald Hanche-Olsen <=
Re: Convert UTF-8, Peter Dyballa, 2008/12/17