Hello Mike and everybody!

>> >>> Maybe doing ࣕ would be better in a general setting?

>> Well, i was speaking about doing out.write("ࣕ") in a _servlet_.
> Bringing up the "�" representation is a good idea, but html character
> entities should be decimal numbers and "\u2261"  converted from hex to
> decimal is 8801.
Thanks! And we also could do "≡" to avoid conversion to
decimal. This way we enlarge our html page by 1 byte, of course.

MA> Originally, I highly doubted that something as high as 8801 was doable as
MA> an HTML character entity.  According to "Webmaster in a Nutshell", these
MA> HTML character entities must be ISO-8859-1 characters, and not even the
MA> full 256 ISO-8859-1 character set is supported.
This is an abstract from the HTML 4.0 spec, http://www.w3.org/TR/REC-html40

'3.2.3 Character references

Character references are numeric or symbolic names for characters that
may be included in an HTML document. They are useful for referring to
rarely used characters, or those that authoring tools make it difficult
or impossible to enter. You will see character references throughout
this document; they begin with a "&" sign and end with a semi-colon (;).
Some common examples include:

     "&lt;" represents the < sign.
     "&gt;" represents the > sign.
     "&quot;" represents the " mark.
     "&#229;" (in decimal) represents the letter "a" with a small circle above it.
     "&#1048;" (in decimal) represents the Cyrillic capital letter "I".
     "&#x6C34;" (in hexadecimal) represents the Chinese character for water.'

So these look pretty much like Unicode character codes.
This way we embed, say cyrillics into ISO-8859-1 coded pages, but it
is quite wastefull as instead of two bytes per char as we would need
with utf-8 or 1 byte per char as with windows-1251 we need at least 7.

But if this are just some chars in the doc it is quite affordable!

MA> However I checked anyway and "&#8801;" works great --just to show how
MA> accurate a book from June 99 is.  I ran:
MA>                 for(int i=0x2200; i<=0x22ff; i++)
MA>                 {
MA>                         if ( i % 16 == 0 ) out.println("<tr>");
MA>                         out.print("<td>&#"+i+";");
MA>                 }
MA> To print the entire "Unicode Mathematical Operators" set.  About 1/4
MA> displayed in Internet Explorer 6.0, and the full set displayed in Netscape
MA> 6.1 and Opera 6.0.
Thanks for investigating this, it's an interesting result!

MA> So it looks like 'System.out.println("&8801;");' is the solution as you
MA> said.

Why System.out ;-) ?
Sure it is just 'out' if we're in a jsp or whatever you have named it
if it is your own servlet!
So, 'out.write("&#8801;");' is the solution!
(Please excuse me for being over-pedantic!)
Best regards,
 Anton                            mailto:[EMAIL PROTECTED]

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to