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.
··········@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.
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