emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add non-ASCII characters to morse.el


From: Simon Josefsson
Subject: Re: [PATCH] Add non-ASCII characters to morse.el
Date: Thu, 21 Nov 2002 12:30:14 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

"Stefan Monnier" <monnier+gnu/address@hidden> writes:

>> > In article <address@hidden>, Simon Josefsson <address@hidden> writes:
>> >> Is there a better way to represent non-ASCII in elisp?
>> >
>> > What do you mean?  Some way other than Lisp string?
>> 
>> Yes.  The coding system used by *.el doesn't seem fixed, so if I add a
>> morse sequence for the euro sign by storing the euro sign literally,
>> someone else opening the file might read it as a Latin-1 currency
>> symbol -- and emacs treat the two characters as distinct.  Should I
>> add a charset cookie to the file perhaps?
>
> Yes.  And I recommend the utf-8 cookie if it's an option.

OK.  Is it ok to install the patch below?  I didn't find the Ch
ligature so I left it in a comment.

--- morse.el.~1.4.~     2001-07-16 11:10:19.000000000 +0200
+++ morse.el    2002-11-21 12:22:47.000000000 +0100
@@ -1,4 +1,4 @@
-;;; morse.el --- convert text to morse code and back
+;;; morse.el --- convert text to morse code and back             -*- coding: 
utf-8 -*-
 
 ;; Copyright (C) 1995 Free Software Foundation, Inc.
 
@@ -76,7 +76,17 @@
                     ("6" . "-....")
                     ("7" . "--...")
                     ("8" . "---..")
-                    ("9" . "----."))
+                    ("9" . "----.")
+                    ;; Non-ASCII
+                    ("Ä" . ".-.-")
+                    ("Á" . ".--.-")
+                    ("Å" . ".--.-")
+                    ;; ligature character?? ("Ch" . "----")
+                    ("ß" . ".../...")
+                    ("É" . "..-..")
+                    ("Ñ" . "--.--")
+                    ("Ö" . "---.")
+                    ("Ü" . "..--"))
   "Morse code character set.")
 
 ;;;###autoload





reply via email to

[Prev in Thread] Current Thread [Next in Thread]