From: Joel Smith
Subject: lisp function similar to perl tr
Date: 
Message-ID: <8c14dcec.0409222008.2dd04031@posting.google.com>
I'm trying to translate some IPA characters from one form to another. 
Unfortunately, it can't be done in perl because it won't process IPA
text characters, so i thought i'd do it in emacs lisp.  i need to
translate all occurances of regular characters that are in between
square brackets.  For example, [ AYspb ] should be translated to my
IPA characters.  if i was using perl I could just write something like

while ($text =~ m/\[ (.*?) \]/g){
   $string = $1;
   $string =~ tr/textcharacters/IPA-characters/g;
   ... something to replace $string with what's in $text ...
}

does something like tr exist in emacs lisp?  

thanks.

From: Pascal Bourguignon
Subject: Re: lisp function similar to perl tr
Date: 
Message-ID: <87vfe5ef9t.fsf@thalassa.informatimago.com>
··········@earthlink.net (Joel Smith) writes:

> I'm trying to translate some IPA characters from one form to another. 
> Unfortunately, it can't be done in perl because it won't process IPA
> text characters, so i thought i'd do it in emacs lisp.  i need to
> translate all occurances of regular characters that are in between
> square brackets.  For example, [ AYspb ] should be translated to my
> IPA characters.  if i was using perl I could just write something like
> 
> while ($text =~ m/\[ (.*?) \]/g){
>    $string = $1;
>    $string =~ tr/textcharacters/IPA-characters/g;
>    ... something to replace $string with what's in $text ...
> }
> 
> does something like tr exist in emacs lisp?  

1- ask your emacs questions to the emacs newsgroups.
2- what is an IPA character?

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.
From: mikel
Subject: Re: lisp function similar to perl tr
Date: 
Message-ID: <Nnt4d.438$JG2.256@newssvr14.news.prodigy.com>
Pascal Bourguignon wrote:

> 2- what is an IPA character?
> 

International Phonetic Alphabet?
From: ·····@edoras.trapp.net
Subject: Re: lisp function similar to perl tr
Date: 
Message-ID: <y594qlpe5tj.fsf@edoras.trapp.net>
See the entry `Coding Systems' in the elisp manual, especially
`Explicit Encoding and Decoding', the functions encode-coding-*
and decode-coding-* (for regions and strings).

But maybe Emacs'd do things for you if you squint at the right
angle ;-)

Regards

-- tom�s