Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi - HTML symbol for ?

Status
Not open for further replies.
Or in HTML directly (quick answer)
&*9792; replacing * with a # (so that it shows up here)

Keep in mind however, that wherever you store the symbol (especially if you don't do it by the HTML entity method) needs to be able to handle unicode characters.

A webpage presented in iso standard or without a character encoding declared will not show that symbol correctly on all browsers, so I recommend that you have at the top of your pages if posisble.

Code:
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">

Most (english speaking) people tend to use ISO-8859-1 by default, however that won't support the extended unicode character set.




Karl Blessing
 
Hi,

thanks, I didn't post it in here, but I had found that symbol code.

but I use
Code:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

and its showing ok.

Whener I try to use charset=utf-8 I end up changing cause it gives me alot of troubles with accents and such.

Thanks
 
Probably based on your editor then too (I run into the same problem when someone cuts and pastes text from MS Word into html file, things like quotes and backquotes and such start showing up like question marks, so you gota go in remove em, then actually type the quote from your keyboard).

But good you found your solution, and are using a charset that you know works with your content.

Karl Blessing
 
Yes, the "smart quotes" from word are a problem, and they have always been. If you really want to support them, you can set the character encoding to the one Windows uses (cp-1252, if I recall correctly), or convert them somehow to the real HTML characters.

By the way, please do not send the meta header as suggested. It is foolish that the encoding must be hacked from the encoded file! That is like locking the key to a safe inside it. Send a header instead, so it overrides the encoding info already sent by PHP:

Code:
header('Content-Type: text/html;charset=iso-8859-1');

Do so before any output is sent to the browser. Is this your entire site's default? Then consider putting this info in php.ini (for iso-8859-1, it is effectively already there).

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top