unicode.fsp - Frink Server Pages highlighter
[Try unicode.fsp]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML LANG="en">
<HEAD>
<TITLE>Frink Server Pages Unicode Torture Test</TITLE>
<META HTTP-EQUIV="Default-Style" CONTENT="APE Airy">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<LINK REL="StyleSheet" HREF="/frinkdocs/apeairy.css" TYPE="text/css"
TITLE="APE Airy">
<LINK REL="Alternate StyleSheet" HREF="/frinkdocs/style.css" TYPE="text/css"
TITLE="APE Classic">
<LINK REL="Alternate StyleSheet" HREF="/frinkdocs/style2.css" TYPE="text/css"
TITLE="Compact">
<LINK REL="icon" HREF="/images/futureboyicon.png" TYPE="image/png">
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0">
</HEAD>
<BODY>
<H1>Frink Server Pages Unicode Torture Test</H1>
<P>
This page tests how well your browser, my server, the Frink parser, Frink
output routines, and Frink Server Pages, support Unicode
characters. Frink Server Pages are, by default, sent out with
charset=UTF-8, allowing for display of all Unicode characters. Your font
must also have glyphs for all characters, or your browser should know how
to fall back gracefully to find an appropriate font containing that glyph.
</P>
<%
for c = 0 to 1F9FF\\16
{
if (c mod 256 == 0)
{
println["<H2>" + uc[base16[c]] + " - " + uc[base16[c+255]] + "</H2>"]
println["<TABLE WIDTH=\"100%\" BORDER=0>"]
println["<TR><TD><TH>0<TH>1<TH>2<TH>3<TH>4<TH>5<TH>6<TH>7<TH>8<TH>9<TH>A<TH>B<TH>C<TH>D<TH>E<TH>F"]
}
if (c mod 16 == 0)
print[" <TR><TH>" + uc[base16[c div 16]] + "x" ]
/* We can't call isDefined if we want to see all of the characters from a
Unicode release that isn't yet supported by this version of Java. For
example, Java 8 only supports Unicode 6 and we don't see the new characters
if we perform this test. Java 9 only supports Unicode 8, and Unicode is up
to version 10. Knowing this, we leave it up to the browser to at least
try to display the character, but we may not know its name. (Which was not
even available until Java 1.7)
Java will probably always be behind Unicode unless it fetches Unicode tables
directly from the source.
Comment this back in later if Java ever catches up.
*/
// if ! callJava["java.lang.Character", "isDefined", c]
// print["<TD>"]
// else
// {
charname = callJava["java.lang.Character", "getName", [c]]
if charname != undef
print["<TD CLASS=\"noborder\" TITLE=\"$charname
\">" + char[c]]
else
print["<TD CLASS=\"noborder\">" + char[c]]
// }
if (c mod 256 == 255)
println["</TABLE>"]
} %>
<HR>
<P>
<I><A HREF="mailto:eliasen@mindspring.com">Alan Eliasen</A></I> was born
<%= round[now[] - #1969-08-19 04:54 PM Mountain#, minute] -> ["days", "hours", "minutes"] %>
ago.
</P>
<P>
Back to <A HREF="/frinkdocs/fspdocs.html">Frink Server Pages
documentation.</A>
</P>
</BODY>
</HTML>
[Try unicode.fsp]
Alan Eliasen was born
20218 days, 0 hours, 55 minutes ago.
Back to Frink Server Pages
documentation.