* [PATCH] Add non-ASCII characters to morse.el
@ 2002-11-20 11:25 Simon Josefsson
2002-11-20 11:54 ` Kenichi Handa
0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2002-11-20 11:25 UTC (permalink / raw)
Is there a better way to represent non-ASCII in elisp? If anyone has
a better source of non-ASCII morse characters, it might be useful as
well. Unfortunately, I think morse has been dropped as an official
language, so a canonical source might be difficult to find.
2002-11-20 Simon Josefsson <jas@extundo.com>
* play/morse.el (morse-code): Add non-ASCII characters, according
to table at http://www.soton.ac.uk/~scp93ch/morse/.
--- morse.el.~1.4.~ 2001-07-16 11:10:19.000000000 +0200
+++ morse.el 2002-11-20 12:22:29.000000000 +0100
@@ -76,7 +76,16 @@
("6" . "-....")
("7" . "--...")
("8" . "---..")
- ("9" . "----."))
+ ("9" . "----.")
+ ;; Non-ASCII
+ ("Ä" . ".-.-")
+ ("Á" . ".--.-")
+ ("Å" . ".--.-")
+ ("Ch" . "----")
+ ("É" . "..-..")
+ ("Ñ" . "--.--")
+ ("Ö" . "---.")
+ ("Ü" . "..--"))
"Morse code character set.")
;;;###autoload
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add non-ASCII characters to morse.el
2002-11-20 11:25 [PATCH] Add non-ASCII characters to morse.el Simon Josefsson
@ 2002-11-20 11:54 ` Kenichi Handa
2002-11-20 19:33 ` Simon Josefsson
0 siblings, 1 reply; 7+ messages in thread
From: Kenichi Handa @ 2002-11-20 11:54 UTC (permalink / raw)
Cc: emacs-devel
In article <ilu8yzoscs8.fsf@latte.josefsson.org>, Simon Josefsson <jas@extundo.com> writes:
> Is there a better way to represent non-ASCII in elisp?
What do you mean? Some way other than Lisp string?
> If anyone has a better source of non-ASCII morse
> characters, it might be useful as well. Unfortunately, I
> think morse has been dropped as an official language, so a
> canonical source might be difficult to find.
This page shows Japanese version of morse. But, perhaps,
it conflicts with English morse.
<http://www5b.biglobe.ne.jp/~a1c/CW_J.htm>
> 2002-11-20 Simon Josefsson <jas@extundo.com>
> * play/morse.el (morse-code): Add non-ASCII characters, according
> to table at http://www.soton.ac.uk/~scp93ch/morse/.
[...]
> + ("Ch" . "----")
It seems that this entry doesn't work because mouse-region
checks characters one by one.
---
Ken'ichi HANDA
handa@m17n.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add non-ASCII characters to morse.el
2002-11-20 11:54 ` Kenichi Handa
@ 2002-11-20 19:33 ` Simon Josefsson
2002-11-20 21:22 ` Stefan Monnier
0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2002-11-20 19:33 UTC (permalink / raw)
Cc: emacs-devel
Kenichi Handa <handa@m17n.org> writes:
> In article <ilu8yzoscs8.fsf@latte.josefsson.org>, Simon Josefsson <jas@extundo.com> 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?
>> If anyone has a better source of non-ASCII morse
>> characters, it might be useful as well. Unfortunately, I
>> think morse has been dropped as an official language, so a
>> canonical source might be difficult to find.
>
> This page shows Japanese version of morse. But, perhaps,
> it conflicts with English morse.
> <http://www5b.biglobe.ne.jp/~a1c/CW_J.htm>
They do conflict. Interesting. Is there a universal morse prefix for
language tagging morse code? Can we use emacs internal charset
guessing algorithm for deciding which morse language to use? Perhaps
this is too complicated for a toy package. Unless someone wants to
work on it, I think we should only add non-conflicting characters.
(One character missing in my patch was .../... for ß.)
>> 2002-11-20 Simon Josefsson <jas@extundo.com>
>
>> * play/morse.el (morse-code): Add non-ASCII characters, according
>> to table at http://www.soton.ac.uk/~scp93ch/morse/.
> [...]
>> + ("Ch" . "----")
>
> It seems that this entry doesn't work because mouse-region
> checks characters one by one.
Thanks. I think it is supposed to be only one character (a
ligature?), but I don't know how to produce it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add non-ASCII characters to morse.el
2002-11-20 19:33 ` Simon Josefsson
@ 2002-11-20 21:22 ` Stefan Monnier
2002-11-21 11:30 ` Simon Josefsson
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2002-11-20 21:22 UTC (permalink / raw)
Cc: Kenichi Handa, emacs-devel
> > In article <ilu8yzoscs8.fsf@latte.josefsson.org>, Simon Josefsson <jas@extundo.com> 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.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add non-ASCII characters to morse.el
2002-11-20 21:22 ` Stefan Monnier
@ 2002-11-21 11:30 ` Simon Josefsson
2002-11-22 16:11 ` Karl Eichwalder
0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2002-11-21 11:30 UTC (permalink / raw)
Cc: Kenichi Handa, emacs-devel
"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:
>> > In article <ilu8yzoscs8.fsf@latte.josefsson.org>, Simon Josefsson <jas@extundo.com> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add non-ASCII characters to morse.el
2002-11-21 11:30 ` Simon Josefsson
@ 2002-11-22 16:11 ` Karl Eichwalder
2002-11-22 17:00 ` Simon Josefsson
0 siblings, 1 reply; 7+ messages in thread
From: Karl Eichwalder @ 2002-11-22 16:11 UTC (permalink / raw)
Cc: Kenichi Handa, emacs-devel
Simon Josefsson <jas@extundo.com> writes:
> +;;; morse.el --- convert text to morse code and back -*- coding: utf-8 -*-
>
[...]
> + ;; Non-ASCII
> + ("Ä" . ".-.-")
> + ("Á" . ".--.-")
Probably a Gnus problem: your patch were converted to iso-8859-1 -- I
guess you forgot to protect the diff using these "mml" tags and
Emacs/Gnus happily unified UTF-8 to the default encoding.
--
ke@suse.de (work) / keichwa@gmx.net (home): |
http://www.gnu.franken.de/ke/ | ,__o
Free Translation Project: | _-\_<,
http://www.iro.umontreal.ca/contrib/po/HTML/ | (*)/'(*)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add non-ASCII characters to morse.el
2002-11-22 16:11 ` Karl Eichwalder
@ 2002-11-22 17:00 ` Simon Josefsson
0 siblings, 0 replies; 7+ messages in thread
From: Simon Josefsson @ 2002-11-22 17:00 UTC (permalink / raw)
Cc: Stefan Monnier, Kenichi Handa, emacs-devel
Karl Eichwalder <keichwa@gmx.net> writes:
> Simon Josefsson <jas@extundo.com> writes:
>
>> +;;; morse.el --- convert text to morse code and back -*- coding: utf-8 -*-
>>
>
> [...]
>
>> + ;; Non-ASCII
>> + ("Ä" . ".-.-")
>> + ("Á" . ".--.-")
>
> Probably a Gnus problem: your patch were converted to iso-8859-1 -- I
> guess you forgot to protect the diff using these "mml" tags and
> Emacs/Gnus happily unified UTF-8 to the default encoding.
Yup. It is a feature, actually, since more people support ISO-8859-1
than UTF-8, so if UTF-8 can be expressed as ISO-8859-1 (which was the
case here, I believe) Gnus downgrades it. I was happy to see that it
actually works in practice. The commited file should be in UTF-8
though.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-11-22 17:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-20 11:25 [PATCH] Add non-ASCII characters to morse.el Simon Josefsson
2002-11-20 11:54 ` Kenichi Handa
2002-11-20 19:33 ` Simon Josefsson
2002-11-20 21:22 ` Stefan Monnier
2002-11-21 11:30 ` Simon Josefsson
2002-11-22 16:11 ` Karl Eichwalder
2002-11-22 17:00 ` Simon Josefsson
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.