opensubscriber
   Find in this group all groups
 
Unknown more information…

h : help-gnu-emacs@gnu.org 31 May 2012 • 11:59PM -0400

Re: those funny non-ASCII characters
by PJ Weisberg

REPLY TO AUTHOR
 
REPLY TO GROUP




On Wednesday, May 30, 2012, Buchs, Kevin <buchs.kevin@mayo...> wrote:

> What about opening an ASCII coded file? Can emacs
> properly detect it or does it come up as UTF-8?

Emacs attempts to determine the correct coding system when it opens a file,
so you shouldn't have to worry about this.

The 128 characters that make up ASCII have the exact same representation in
UTF-8.  "Converting" as ASCII file to UTF-8 is a no-op.  Therefore,
treating an ASCII file as UTF-8 should cause no problems.

> I assume that if my lisp library files are encoded utf-8, then I can
> paste that UTF-8 character from the web page into my call to
> (replace-string ...) in order to substitute the longer dash of Unicode
> U+2013 with an ASCII hyphen or double hyphen. But, how does that really
> work? If the lisp file is encoded utf-8, then how can I put an ASCII
> character in the replacement string? Or do I need to encode the hex
> value of the ASCII character(s)?

A = A.  The hyphen-minus is a hyphen-minus whether it's in an ASCII file as
00101101 or a UTF-16 file as 0000000000101101.  So, just type it with your
keyboard.

BTW, I don't know how Xah intended it, but when he said to "embrace
unicode," I interpreted it to mean, "Why don't you just leave em-dashes as
em-dashes instead of replacing them with two hyphen-minuses?"

--
-PJ

Gehm's Corollary to Clark's Law: Any technology distinguishable from
magic is insufficiently advanced.

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.