umlauts

Post Reply
eraldo
Posts: 43
Joined: Sun Jul 12, 2009 1:25 am

umlauts

Post by eraldo »

U need to change every "ä","ö" and "ü" to "ae", "oe" and "ue"
before it gets sent to the mud.

I tried to make an alias for each with pattern "ä" and substitute "ae".
However this replaces the entire input and "ae" is sent to the mud.

What would be the recommended way to change pieces of my input before it is sent to the mud?

Greetings from Austria,
Eraldo

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: umlauts

Post by Heiko »

You make an alias that translates umlaute into the respective diagraphs i. e. ü->ue, ö->oe, ß ->ss etc.
name: umlaute filter
pattern: ü|ö|ä|Ü|Ö|Ä|ß
script:

Code: Select all

-- echo("<UMLAUTE herausgenommen> <"..command..">\n");
command = string.gsub(command, 'ü', 'ue' );
command = string.gsub(command, 'ö', 'oe' );
command = string.gsub(command, 'ä', 'ae' );
command = string.gsub(command, 'Ä', 'Ae' );
command = string.gsub(command, 'Ö', 'Oe' );
command = string.gsub(command, 'Ü', 'Ue' );
command = string.gsub(command, 'ß', 'ss' );

send( command );
As this is a very common problem for German MUDs I have attached a ready made package.
Attachments
umlaut_filter.xml
(781 Bytes) Downloaded 401 times

Post Reply