ISO8559 HTML Conversion Machine


January 6th, 1996, Ottawa

Coder: John Criswick, Ottawa, criswick@conveyor.com
Copyright (c) 1996, John R. Criswick. All rights reserved


Items of interest to Java developers on this page are the following:

- sample code for using text fields and buttons

- a class for converting between ASCII values and HTML Entity Names

The following applet was used to verify the Entity Name converter class I developed, but the applet code in itself is useful as an example of how to use buttons and text fields.

For the moment I only provide the Java stubbed code for the entity name converter class. It took alot of time to enter! If you'd like the source code, let me know. I am using it in a TickerTape applet I'm working on, but I imagine it could be of some use to people developing other sorts of HTML viewers and editors.


The applet here shows four Java TextFields and two Java Buttons. The text fields on the right are the output of what you apply into the conversion "machine" from the two corresponding fields on the left.

In the upper left text field you can enter a number between 0 and 255 or a single character. Click on the "HTML ->" button and you'll see the corresponding HTML entity name.

In the lower left you can enter an entity name and see its corresponding ISO implementation (that is converted to an ASCII value and output).

Also, check the digital clock applet for yet another Java digital clock and the ticker-tape applet for an LED Ticker Tape for which I developed the entity converter class.

Questions or comments to: John Criswick by e-mail to criswick@conveyor.com.

Source code for the Applet:

    java.applet.Applet
       |
       +----Entity.java

    ISO8859.java

Class objects for the Applet and Entity Converter:
    Entity.class

    ISO8859.class