HTML Character Converter

From Swivel Knowledgebase
Jump to: navigation, search



Summary

When entering non-ASCII characters in transport messages, the safest way to do this is to use HTML encoding, in the format "&#xnnnn;", where nnnn is the hexadecimal Unicode value for the character. However, looking these up and entering them in the transport details page can be a slow and error-prone process, so we have provided a basic tool to simplify the process.

Prerequisites

This application runs under Windows and requires the Microsoft.Net Framework version 4.5.

Download from here.

Installation

The application is provided as a single program, and has no installation process. Simply unzip the application from the download and place it in a suitable location.

Using the program

When you run the application, you will see a text box with 4 buttons under it:

ConvertToHtmlRawText.png

Simply type the desired text in the box. Click the Show HTML button to show the text with non-ASCII characters converted to HTML entity codes:

ConvertToHtmlHtmlText.png

Note that in this mode, you cannot enter further text: click Show Text to return to the raw text display to enter more text.

The Copy button will copy the HTML-encoded text to the Windows clipboard, ready to be pasted into the appropriate transport message. It will also select the HTML preview if you have not already done so.

The Exit button closes the program.

Additional Features

As well as the functions available from the buttons, there is a menu which provides the following functionality:

  • File menu
    • Open - opens a text file in the text edit box. The file must be UTF-8 or UTF-16 encoded for this to work correctly. Any existing text will be overwritten.
    • Exit - closes the program.
  • Edit menu
    • Copy - same as the Copy button.
    • Paste - pastes the current contents of the clipboard into the edit box as raw text.
  • View menu
    • Raw Text - same as the Show Text button
    • HTML - same as the Show HTML button

Note that as well as converting non-ASCII characters, the program also converts certain other characters. For example, line breaks are converted to HTML
, and the characters &, ", ', < and > are converted to the appropriate HTML entities.