Forum Moderators: open

Message Too Old, No Replies

Special Characters: Entities vs. Numeric vs. Copy/Paste

Are there pros/cons when inputting special characters?

         

snair

6:30 am on Sep 10, 2009 (gmt 0)

10+ Year Member



There's a special character that I want to use, the rightwards arrow.

Now I know I can either use:

→ or
→ or
→ or
I can even directly copy and paste the → character.

So I'm wondering what are the pros and cons?

Is one preferred over another?

D_Blackwell

3:10 pm on Sep 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Take your pick. The first is an entity character reference (identified by &text), the second is a decimal numeric character reference (identified by &#number), and the third is is a hexadecimal numeric character reference (identified by &#xnumber).

All are valid references for the symbol in HTML4.

swa66

6:19 am on Sep 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I actually prefer the html entity → notation for it isn't dependent on having a certain character encoding loaded.

piatkow

12:59 pm on Sep 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I go for the same notation simply because it is (usually) intuitive to type and I can read the source code without referring to a lookup.

snair

6:28 am on Sep 13, 2009 (gmt 0)

10+ Year Member



Thanks for the tips! I guess I'll stick with the entities then.