Forum Moderators: open

Message Too Old, No Replies

special characters

can I specify an alternative?

         

mjb2

4:30 pm on Nov 13, 2007 (gmt 0)

10+ Year Member



I need to specify mathematical symbols on my site, such as:
ℜ
≅

Some computers/browsers support these and some don't. In the case of computers that don't is there a way that I can specify an alternative instead of having a square displayed.

What I'm looking for is an 'alt' parameter for individual characters.

If thats not possible are there any other workarounds?

Thanks, Martin

rocknbil

8:01 pm on Nov 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could play around with valid document types, this may lead to a solution. Have you tried the hex equivalents of the entities? Examples:

≅ instead of ≅ - approximately equal to, U+2245
ℜ instead of ℜ -- blackletter capital R = real part symbol, U+211C

[w3.org...]

mjb2

10:23 pm on Nov 13, 2007 (gmt 0)

10+ Year Member



Thanks, I'm currently using the following doc type:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

I would be concerned about changing it in case it broke something else?

If I used hex equivalents then would support depend on what fonts users had installed? I would really like some way to fall back to something sensible if the os/browser/font of the users computer does not support the exact character. The problem is that I can't test out all the possible os/browser type/browser version/font combinations.

Martin