You also have to remember that changing to kanji is probably not the best to change it into as there are at least 2 ways that every kanji can be pronounced and there are many kanji that make the same sound and hence same romaji. The only way to do a script that you were after by any means is a romaji to hiragana or a romaji to katakana script that could translate either way.
However there is one other possibility and that is to make sure that your friend uses a hiragana/katakana/kanji to romaji converter before sending a message to you and hence being able to have the longer message.
These are just some things to think about when making the script (whoever decides to devote their time to the project).
[off-topic]
quote:
Originally posted by CookieRevised
The next pseudo code is almost always used in scripts like this (you can verify this in the scripting database). But it will, in most cases, render wrong results:
(Post cut short.... sorry Cookie)
This is easily fixed by using a function in your replace method instead
code:
var oString = "abcd";
var eString = oString.replace(/a|b|c|d/g,function($1){
switch($1){
case "a":
return "b";
case "b":
return "c";
case "c":
return "d";
case "d"
return "a";
}
});
return eString;
This will return "bcda".
[/off-topic]