unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* alphabets resp. locales
@ 2010-08-11  7:51 Andreas Röhler
  2010-08-11 11:31 ` Peter Dyballa
  2010-08-13  3:04 ` Kevin Rodgers
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Röhler @ 2010-08-11  7:51 UTC (permalink / raw)
  To: help-gnu-emacs


Hi,

is there a way to get the chars of alphabets with resp. to locales?

A general way to get all chars of the french alphabet for example?

Below some work-around for the german alphabet.

Comments welcome

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/

;;;;;;;;;;

(defun german-alphabet ()
   "Returns chars of german alphabet. "
   (interactive)
   (let (gebundene-staebe)
     (loop for i upfrom 97 to 122 do
           (setq gebundene-staebe (concat gebundene-staebe (format "%c" 
i))))
     (loop for i upfrom 65 to 90 do
           (setq gebundene-staebe (concat gebundene-staebe (format "%c" 
i))))
     (setq gebundene-staebe (concat gebundene-staebe "äöüÄÖÜß"))
     (when (interactive-p) (message "%s" gebundene-staebe))
     gebundene-staebe))




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

* Re: alphabets resp. locales
  2010-08-11  7:51 alphabets resp. locales Andreas Röhler
@ 2010-08-11 11:31 ` Peter Dyballa
  2010-08-11 11:56   ` Andreas Röhler
  2010-08-13  3:04 ` Kevin Rodgers
  1 sibling, 1 reply; 9+ messages in thread
From: Peter Dyballa @ 2010-08-11 11:31 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: help-gnu-emacs


Am 11.08.2010 um 09:51 schrieb Andreas Röhler:

> is there a way to get the chars of alphabets with resp. to locales?

Alphabets are something for humans, a computer or its software does  
not need to know such volatile entities. Why don't you write an  
interface to wikipedia to download them?

--
Mit friedvollen Grüßen

   Pete

Stop-and-go:
	Bezeichnung für die vergeblichen Bemühungen der Outomobilistinnen,  
durch "Stop" schneller zu sein als die Fußgängerinnen durch "Go."




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

* Re: alphabets resp. locales
  2010-08-11 11:31 ` Peter Dyballa
@ 2010-08-11 11:56   ` Andreas Röhler
  2010-08-11 13:05     ` Peter Dyballa
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Röhler @ 2010-08-11 11:56 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

Am 11.08.2010 13:31, schrieb Peter Dyballa:
>
> Am 11.08.2010 um 09:51 schrieb Andreas Röhler:
>
>> is there a way to get the chars of alphabets with resp. to locales?
>

Hi Peter,

> Alphabets are something for humans,

as Emacs...

a computer or its software does not
> need to know such volatile entities.

Emacs knows, I'm pretty sure it's mapped somewhere.

  Why don't you write an interface to
> wikipedia to download them?
>

Ohh, WP. For several reasons I would not do that. Despite the fact, I'm 
getting quite often useful info from there, thanks BTW to all innocent 
people there.

Unfortunatly, WP is a inresponsible, dirty pool also.

Let's stress the also, that depends.
Maybe read some diskussions on WP list concerning missing responsablity 
of content.

So rather I'd write an interface right onto Blackwater. :-)

Andreas




> --
> Mit friedvollen Grüßen
>
> Pete
>
> Stop-and-go:
> Bezeichnung für die vergeblichen Bemühungen der Outomobilistinnen, durch
> "Stop" schneller zu sein als die Fußgängerinnen durch "Go."
>
>
>




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

* Re: alphabets resp. locales
  2010-08-11 11:56   ` Andreas Röhler
@ 2010-08-11 13:05     ` Peter Dyballa
  2010-08-11 13:48       ` Andreas Röhler
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Dyballa @ 2010-08-11 13:05 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: help-gnu-emacs


Am 11.08.2010 um 13:56 schrieb Andreas Röhler:

> Emacs knows, I'm pretty sure it's mapped somewhere.


For what? Which is the purpose of an alphabet? Why came Apple with a  
first MacRoman *encoding* and MS with so-called "code pages"? Both  
companies and even more users of this hard- and software would have  
had an easy life with alphabets instead of encodings.


Did a 'grep abcd' on the GNU Emacs sources reveal something? Did you  
read about charsets?


A test whether some character is alphabetic or something else is not  
limited to whether this character is or was or will be used in some  
language variant of some country at some era.

--
Mit friedvollen Grüßen

   Pete

Spam will be a thing of the past in two years' time.
				– Bill Gates, Jan 2004




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

* Re: alphabets resp. locales
  2010-08-11 13:05     ` Peter Dyballa
@ 2010-08-11 13:48       ` Andreas Röhler
  2010-08-11 14:52         ` Peter Dyballa
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Röhler @ 2010-08-11 13:48 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

Am 11.08.2010 15:05, schrieb Peter Dyballa:
>
> Am 11.08.2010 um 13:56 schrieb Andreas Röhler:
>
>> Emacs knows, I'm pretty sure it's mapped somewhere.
>
>
> For what? Which is the purpose of an alphabet?



I'm sure Emacs has already an instance of it, as [[:alpha:]] is working.

Question was where and how to pick.

[ ... ]


Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/



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

* Re: alphabets resp. locales
  2010-08-11 13:48       ` Andreas Röhler
@ 2010-08-11 14:52         ` Peter Dyballa
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2010-08-11 14:52 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: help-gnu-emacs


Am 11.08.2010 um 15:48 schrieb Andreas Röhler:

> I'm sure Emacs has already an instance of it, as [[:alpha:]] is  
> working.

As I mentioned: this test or set has nothing to do with an "alphabet"  
of a natural, spoken and/or written, language. The alphabetic  
characters are no digits and not graphic and neither control  
characters and can be converted to either lowers or uppers, i.e., an  
upper and a lower case exist. In other words: they are word  
components. Words don't contain digits, $, &, etc. Dotless i and j,  
German ß, as just a few modern examples from the Latin based scripts,  
are a bit problematic (only one case). All alphabetic characters  
delimit the word from inside the word, non-alphabetic characters embed  
the words into a sentence or part of a sentence (in case the speaker  
suddenly dies or is interrupted).

--
Mit friedvollen Grüßen

   Pete

Es geht nix über eine elektrische Klobürste!




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

* Re: alphabets resp. locales
       [not found] <mailman.1.1281513191.2982.help-gnu-emacs@gnu.org>
@ 2010-08-11 15:45 ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2010-08-11 15:45 UTC (permalink / raw)
  To: help-gnu-emacs

> is there a way to get the chars of alphabets with resp. to locales?

I don't think Emacs has this info.  We have info about particular
charsets, and some charsets have been designed for particular (set of)
languages, so if you filter them to only keep alphabetic chars from
those charsets, you might get something similar to what I'd call an
"alphabet", but it's still an approximation.

Now, this lack of alphabet-info has nev4er shown up yet, so maybe you
don't actually need it either.  If you tell us what you want to do with
it, maybe we can help you better,


        Stefan


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

* Re: alphabets resp. locales
  2010-08-11  7:51 alphabets resp. locales Andreas Röhler
  2010-08-11 11:31 ` Peter Dyballa
@ 2010-08-13  3:04 ` Kevin Rodgers
  2010-08-13  6:22   ` Andreas Röhler
  1 sibling, 1 reply; 9+ messages in thread
From: Kevin Rodgers @ 2010-08-13  3:04 UTC (permalink / raw)
  To: help-gnu-emacs

Andreas Röhler wrote:
> 
> Hi,
> 
> is there a way to get the chars of alphabets with resp. to locales?
> 
> A general way to get all chars of the french alphabet for example?
> 
> Below some work-around for the german alphabet.

I don't know how to map the locale/language to a character set (possibly via
a coding system), but locale-language-names looks promising.

Once that's done, here's a start:

(map-charset-chars (lambda (range arg)
		     (let ((char (car range)))
		       (while (<= char (cdr range))
			 (when (string-match "[[:alpha:]]"
					     (char-to-string char))
			   (print (char-to-string char)))
			 (setq char (1+ char)))))
		   character-set) ; e.g. iso-8859-1

-- 
Kevin Rodgers
Denver, Colorado, USA




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

* Re: alphabets resp. locales
  2010-08-13  3:04 ` Kevin Rodgers
@ 2010-08-13  6:22   ` Andreas Röhler
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Röhler @ 2010-08-13  6:22 UTC (permalink / raw)
  To: Kevin Rodgers; +Cc: help-gnu-emacs

Am 13.08.2010 05:04, schrieb Kevin Rodgers:
> Andreas Röhler wrote:
>>
>> Hi,
>>
>> is there a way to get the chars of alphabets with resp. to locales?
>>
>> A general way to get all chars of the french alphabet for example?
>>
>> Below some work-around for the german alphabet.
>
> I don't know how to map the locale/language to a character set (possibly
> via
> a coding system), but locale-language-names looks promising.
>
> Once that's done, here's a start:
>
> (map-charset-chars (lambda (range arg)
> (let ((char (car range)))
> (while (<= char (cdr range))
> (when (string-match "[[:alpha:]]"
> (char-to-string char))
> (print (char-to-string char)))
> (setq char (1+ char)))))
> character-set) ; e.g. iso-8859-1
>



Thats interesting, however, these iso-sets cover more than one language, 
ie output is a comprehension of several alphabets and others signs.

Needed alphabet to construct and retrieve filenames from it, storing 
there regexps relating to word-beginnings.

Thougt at reading keyboard layouts meanwhile, but assume they also 
deliver more than just a specific alphabet.

For the moment it's done.

Thanks.

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/






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

end of thread, other threads:[~2010-08-13  6:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-11  7:51 alphabets resp. locales Andreas Röhler
2010-08-11 11:31 ` Peter Dyballa
2010-08-11 11:56   ` Andreas Röhler
2010-08-11 13:05     ` Peter Dyballa
2010-08-11 13:48       ` Andreas Röhler
2010-08-11 14:52         ` Peter Dyballa
2010-08-13  3:04 ` Kevin Rodgers
2010-08-13  6:22   ` Andreas Röhler
     [not found] <mailman.1.1281513191.2982.help-gnu-emacs@gnu.org>
2010-08-11 15:45 ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).