(keitai-l) Re: emoji and choking waps

From: Craig Dunn <craig.dunn_at_conceptdevelopment.net>
Date: 01/17/01
Message-ID: <OGEGIKAMGPHPOJLMMLMLKEEKCAAA.craig.dunn@conceptdevelopment.net>
Ron,
>>solution that they would be willing to share?

Below is jscript to :
1) replace imode emoji entities with the graphic from nttdocomo.com
	emojiToImg ()
OR
2) replace with some text
	emojiToText ()

You **must** have Windows Script 5.5 installed !! (from here
http://www.microsoft.com/msdownload/vbscript/scripting.asp )

You can call these functions from VBScript

cd

-----------------------------
<script language=jscript runat=server>
/*********************
* author: Craig Dunn
* date:   17-Jan-01
* desc:   turn emoji into NTT icons
* assumpt:string contains emoji as 'entity' type chars
*         of the form &#99999;
*         May not be a great idea for limited bandwidth, but hey!
* disclaim: the emoji icons are (c) NTTDocomo
*         you should create your OWN icons
*********************/
function emojiToImg (sIn) {
	var RegEx = /\&\#(\d\d\d\d\d)\;/g;	
	var sOut = sIn.replace(RegEx, emojiImgj );
	return sOut;
}
function emojiImgj (sMatchedString, dollar1) {
	var sOut;
	var iEmoji;
	iEmoji = parseInt(dollar1)
	//img format=<img src='http://www.nttdocomo.com/i/tag/emoji/images/5.gif
	sOut = "<img src='http://www.nttdocomo.com/i/tag/emoji/images/"
	if (iEmoji <= 63740 ) {
	sOut = sOut + (iEmoji - 63646);
	} else if (iEmoji <= 63817) {
	sOut = sOut + (iEmoji - (63808 -95));
	} else {
	sOut = sOut + (iEmoji - (63858 -105));
	}
	sOut = sOut + ".gif'>"
	return sOut;
}
/*********************
* author: Craig Dunn
* date:   17-Jan-01
* desc:   turn emoji into text
* assumpt:string contains emoji as 'entity' type chars
*         of the form &#99999;
* disclaim: the emoji icons are (c) NTTDocomo
*         you should create your OWN descriptions
*********************/
function emojiToText (sIn) {
	var RegEx = /\&\#(\d\d\d\d\d)\;/g;	
	var sOut = sIn.replace(RegEx, emojiLookupj );
	return sOut;
}
function emojiLookupj (sMatchedString) {
	var sOut;
	switch (sMatchedString) {
	case "&#63647;"	: sOut = "[Fine]"; break;
	case "&#63648;"	: sOut = "[Cloudy]"; break;
	case "&#63649;"	: sOut = "[Rain]"; break;
	case "&#63650;"	: sOut = "[Snow]"; break;
	case "&#63651;"	: sOut = "[Thunder]"; break;
	case "&#63652;"	: sOut = "[Typhoon]"; break;
	case "&#63653;"	: sOut = "[Fog]"; break;
	case "&#63654;"	: sOut = "[Drizzle]"; break;
	case "&#63655;"	: sOut = "[Aries]"; break;
	case "&#63656;"	: sOut = "[Taurus]"; break;
	case "&#63657;"	: sOut = "[Gemini]"; break;
	case "&#63658;"	: sOut = "[Cancer]"; break;
	case "&#63659;"	: sOut = "[Leo]"; break;
	case "&#63660;"	: sOut = "[Virgo]"; break;
	case "&#63661;"	: sOut = "[Libra]"; break;
	case "&#63662;"	: sOut = "[Scorpio]"; break;
	case "&#63663;"	: sOut = "[Sagittarius]"; break;
	case "&#63664;"	: sOut = "[Capricorn]"; break;
	case "&#63665;"	: sOut = "[Aquarius]"; break;
	case "&#63666;"	: sOut = "[Pisces]"; break;
	case "&#63667;"	: sOut = "[Sports]"; break;
	case "&#63668;"	: sOut = "[Baseball]"; break;
	case "&#63669;"	: sOut = "[Golf]"; break;
	case "&#63670;"	: sOut = "[Tennis]"; break;
	case "&#63671;"	: sOut = "[Soccer]"; break;
	case "&#63672;"	: sOut = "[Ski]"; break;
	case "&#63673;"	: sOut = "[Basketball]"; break;
	case "&#63674;"	: sOut = "[Motor sports]"; break;
	case "&#63675;"	: sOut = "[Pager]"; break;
	case "&#63676;"	: sOut = "[Train]"; break;
	case "&#63677;"	: sOut = "[Subway]"; break;
	case "&#63678;"	: sOut = "[Bullet train]"; break;
	case "&#63679;"	: sOut = "[Car (sedan)]"; break;
	case "&#63680;"	: sOut = "[Car (RV)]"; break;
	case "&#63681;"	: sOut = "[Bus]"; break;
	case "&#63682;"	: sOut = "[Ship]"; break;
	case "&#63683;"	: sOut = "[Airplane]"; break;
	case "&#63684;"	: sOut = "[House]"; break;
	case "&#63685;"	: sOut = "[Building]"; break;
	case "&#63686;"	: sOut = "[Post office]"; break;
	case "&#63687;"	: sOut = "[Hospital]"; break;
	case "&#63688;"	: sOut = "[Bank]"; break;
	case "&#63689;"	: sOut = "[ATM]"; break;
	case "&#63690;"	: sOut = "[Hotel]"; break;
	case "&#63691;"	: sOut = "[Convenience store]"; break;
	case "&#63692;"	: sOut = "[Gas station]"; break;
	case "&#63693;"	: sOut = "[Parking]"; break;
	case "&#63694;"	: sOut = "[Traffic signal]"; break;
	case "&#63695;"	: sOut = "[Toilet]"; break;
	case "&#63696;"	: sOut = "[Restaurant]"; break;
	case "&#63697;"	: sOut = "[Caf&eacute;]"; break;
	case "&#63698;"	: sOut = "[Bar]"; break;
	case "&#63699;"	: sOut = "[Beer]"; break;
	case "&#63700;"	: sOut = "[Fast food]"; break;
	case "&#63701;"	: sOut = "[Boutique]"; break;
	case "&#63702;"	: sOut = "[Hairdresser]"; break;
	case "&#63703;"	: sOut = "[Karaoke]"; break;
	case "&#63704;"	: sOut = "[Movie]"; break;
	case "&#63705;"	: sOut = "[Diagonally upward toward right]"; break;
	case "&#63706;"	: sOut = "[Amusement park]"; break;
	case "&#63707;"	: sOut = "[Music]"; break;
	case "&#63708;"	: sOut = "[Art]"; break;
	case "&#63709;"	: sOut = "[Drama]"; break;
	case "&#63710;"	: sOut = "[Event]"; break;
	case "&#63711;"	: sOut = "[Ticket]"; break;
	case "&#63712;"	: sOut = "[Smoking]"; break;
	case "&#63713;"	: sOut = "[Non-smoking]"; break;
	case "&#63714;"	: sOut = "[Camera]"; break;
	case "&#63715;"	: sOut = "[Bag]"; break;
	case "&#63716;"	: sOut = "[Book]"; break;
	case "&#63717;"	: sOut = "[Ribbon]"; break;
	case "&#63718;"	: sOut = "[Present]"; break;
	case "&#63719;"	: sOut = "[Birthday]"; break;
	case "&#63720;"	: sOut = "[Phone]"; break;
	case "&#63721;"	: sOut = "[Mobile phone]"; break;
	case "&#63722;"	: sOut = "[Memo]"; break;
	case "&#63723;"	: sOut = "[TV]"; break;
	case "&#63724;"	: sOut = "[Game]"; break;
	case "&#63725;"	: sOut = "[CD]"; break;
	case "&#63726;"	: sOut = "[Heart]"; break;
	case "&#63727;"	: sOut = "[Spade]"; break;
	case "&#63728;"	: sOut = "[Diamond]"; break;
	case "&#63729;"	: sOut = "[Club]"; break;
	case "&#63730;"	: sOut = "[Eyes]"; break;
	case "&#63731;"	: sOut = "[Ear]"; break;
	case "&#63732;"	: sOut = "[Hand (rock)]"; break;
	case "&#63733;"	: sOut = "[Hand (scissors)]"; break;
	case "&#63734;"	: sOut = "[Hand (paper)]"; break;
	case "&#63735;"	: sOut = "[Diagonally downward toward right]"; break;
	case "&#63736;"	: sOut = "[Diagonally upward toward left]"; break;
	case "&#63737;"	: sOut = "[Foot]"; break;
	case "&#63738;"	: sOut = "[Shoe]"; break;
	case "&#63739;"	: sOut = "[Eyeglasses]"; break;
	case "&#63740;"	: sOut = "[Wheelchair]"; break;
	case "&#63808;"	: sOut = "[New moon]"; break;
	case "&#63809;"	: sOut = "[Waning moon]"; break;
	case "&#63810;"	: sOut = "[Half moon]"; break;
	case "&#63811;"	: sOut = "[Crescent moon]"; break;
	case "&#63812;"	: sOut = "[Full moon]"; break;
	case "&#63813;"	: sOut = "[Dog]"; break;
	case "&#63814;"	: sOut = "[Cat]"; break;
	case "&#63815;"	: sOut = "[Resort]"; break;
	case "&#63816;"	: sOut = "[Christmas]"; break;
	case "&#63817;"	: sOut = "[Diagonally downward toward left]"; break;
	case "&#63858;"	: sOut = "[Phone to]"; break;
	case "&#63859;"	: sOut = "[Mail to]"; break;
	case "&#63860;"	: sOut = "[Fax to]"; break;
	case "&#63861;"	: sOut = "[i-mode]"; break;
	case "&#63862;"	: sOut = "[i-mode with frame]"; break;
	case "&#63863;"	: sOut = "[Mail]"; break;
	case "&#63864;"	: sOut = "[Provided by DoCoMo]"; break;
	case "&#63865;"	: sOut = "[DoCoMo point]"; break;
	case "&#63866;"	: sOut = "[Fee charging]"; break;
	case "&#63867;"	: sOut = "[Free of charge]"; break;
	case "&#63868;"	: sOut = "[ID]"; break;
	case "&#63869;"	: sOut = "[Password]"; break;
	case "&#63870;"	: sOut = "[Continuing]"; break;
	case "&#63872;"	: sOut = "[Clear]"; break;
	case "&#63873;"	: sOut = "[Search]"; break;
	case "&#63874;"	: sOut = "[New]"; break;
	case "&#63875;"	: sOut = "[Location information]"; break;
	case "&#63876;"	: sOut = "[Free dial]"; break;
	case "&#63877;"	: sOut = "[Sharp dial]"; break;
	case "&#63878;"	: sOut = "[MopaQ]"; break;
	case "&#63879;"	: sOut = "[1]"; break;
	case "&#63880;"	: sOut = "[2]"; break;
	case "&#63881;"	: sOut = "[3]"; break;
	case "&#63882;"	: sOut = "[4]"; break;
	case "&#63883;"	: sOut = "[5]"; break;
	case "&#63884;"	: sOut = "[6]"; break;
	case "&#63885;"	: sOut = "[7]"; break;
	case "&#63886;"	: sOut = "[8]"; break;
	case "&#63887;"	: sOut = "[9]"; break;
	case "&#63888;"	: sOut = "[0]"; break;
	case "&#63920;"	: sOut = "[Accept]"; break;
	case "&#63889;"	: sOut = "[Black heart]"; break;
	case "&#63890;"	: sOut = "[Fluttering heart]"; break;
	case "&#63891;"	: sOut = "[Heartbreak]"; break;
	case "&#63892;"	: sOut = "[Hearts]"; break;
	case "&#63893;"	: sOut = "[Happy face]"; break;
	case "&#63894;"	: sOut = "[Angry face]"; break;
	case "&#63895;"	: sOut = "[Disappointed face]"; break;
	case "&#63896;"	: sOut = "[Sad face]"; break;
	case "&#63897;"	: sOut = "[Dizzy]"; break;
	case "&#63898;"	: sOut = "[Good (upward arrow)]"; break;
	case "&#63899;"	: sOut = "[Cheerful]"; break;
	case "&#63900;"	: sOut = "[Comfort (thermal spring)]"; break;
	case "&#63901;"	: sOut = "[Cute]"; break;
	case "&#63902;"	: sOut = "[Kiss]"; break;
	case "&#63903;"	: sOut = "[Shining new]"; break;
	case "&#63904;"	: sOut = "[Good idea]"; break;
	case "&#63905;"	: sOut = "[Angry]"; break;
	case "&#63906;"	: sOut = "[Punch]"; break;
	case "&#63907;"	: sOut = "[Bomb]"; break;
	case "&#63908;"	: sOut = "[Mood]"; break;
	case "&#63909;"	: sOut = "[Bad (downward arrow)]"; break;
	case "&#63910;"	: sOut = "[Sleepy (sleep)]"; break;
	case "&#63911;"	: sOut = "[Exclamation mark]"; break;
	case "&#63912;"	: sOut = "[Exclamation & question marks]"; break;
	case "&#63913;"	: sOut = "[Two exclamation marks]"; break;
	case "&#63914;"	: sOut = "[Bump (collision)]"; break;
	case "&#63915;"	: sOut = "[Sweat]"; break;
	case "&#63916;"	: sOut = "[Cold sweat]"; break;
	case "&#63917;"	: sOut = "[Dash (running dash)]"; break;
	case "&#63918;"	: sOut = "[Macron 1]"; break;
	case "&#63919;"	: sOut = "[Macron 2]"; break;
	default			: sOut = "[?]";
	}
	return sOut;
}
</script>

[ Did you check the archives?   http://www.appelsiini.net/keitai-l/ ]
Received on Wed Jan 17 03:58:05 2001