Special characters ?

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
Ditto
Giant
Posts: 179
Joined: Thu Jul 28, 2011 1:06 pm

Special characters ?

Post by Ditto »

Is there an easy way to display special characters in Maptools?

Currently, I'm just interested in displaying the 1/2 symbol: ½

I don't see any ASCII or CHR type of function though ? Is there anything in Maptools, given the ascii Code #, it can display the symbol ?

User avatar
Irrlicht
Dragon
Posts: 426
Joined: Mon Feb 09, 2009 10:53 am

Re: Special characters ?

Post by Irrlicht »

Reference for all (or at least many) characters: http://www.ascii.cl/htmlcodes.htm

Just write:
½
And it will appear.

Also useful to add certain characters that may mess up a macro's syntax, for example when you need a " inside a string that is already defined with opening and closing double quotes. You just use " and save yourself troubles.
"There are many ways my Son, to find where the souls of Demons remain...
But it takes only one second of despair and of doubt until, at last, your Soul they will gain..."

Ditto
Giant
Posts: 179
Joined: Thu Jul 28, 2011 1:06 pm

Re: Special characters ?

Post by Ditto »

Irrlicht wrote:Reference for all (or at least many) characters: http://www.ascii.cl/htmlcodes.htm

Just write:
½
And it will appear.

Also useful to add certain characters that may mess up a macro's syntax, for example when you need a " inside a string that is already defined with opening and closing double quotes. You just use " and save yourself troubles.
I was wondering if it was something like that .. :)
Thanks!

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Special characters ?

Post by aliasmask »

It will also work by leaving off the ";". There are certain MT functions that use the ; and it could get confused in those cases, but for normal html output, that's not necessary.

Ditto
Giant
Posts: 179
Joined: Thu Jul 28, 2011 1:06 pm

Re: Special characters ?

Post by Ditto »

aliasmask wrote:It will also work by leaving off the ";". There are certain MT functions that use the ; and it could get confused in those cases, but for normal html output, that's not necessary.
Interesting ...

&#189

works just fine from within a basic macro, however, when placed into a function (ala lib:utility), it shows a standard 'block".

I tried:

½

and that worked from within the function ... interesting :)

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Special characters ?

Post by aliasmask »

Context may matter as well, ie what comes after it. You should always use the ; unless MT doesn't like it in a certain function or context, then you can try it without.

Post Reply

Return to “Macros”